GithubHelp home page GithubHelp logo

Comments (14)

dpwiz avatar dpwiz commented on July 20, 2024

Check if it has ridiculous amount of FPS. Looks like you have vsync disabled or something.

I just checked the vulkan demo and it uses MAILBOX presentation for no good reason.

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

from dear-imgui.hs.

ocharles avatar ocharles commented on July 20, 2024

@cartazio I actually removed that comment as it's really more about predictable physics. But in general, you don't really want to render as fast as possible. It's more typical to use something like VSync to synchronise your loop to the monitor's refresh rate, or to simply cap FPS artificially.

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

from dear-imgui.hs.

dpwiz avatar dpwiz commented on July 20, 2024

dirty :: MVar () should be enough for SDL.

But dear-imgui, being an immediate mode gui, requires a constant rate of ticks/updates since it handles its input in the moment.

Maybe I'm wrong on this. Try setting your delay to 10 seconds instead and see if UI still works. If it is, then you can employ that flag var.

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

so definitely doesn't update the gui until the next draw call, so 100ms is probably the slowest thats tolerable

from dear-imgui.hs.

dpwiz avatar dpwiz commented on July 20, 2024

You can make window events flip a "dirty" flag that would trigger a new frame, maybe with a small debounce to prevent burning CPU on every pixel a cursor had traveled.

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

from dear-imgui.hs.

YellowOnion avatar YellowOnion commented on July 20, 2024

A quick option is to just grab the display mode and convert that to a thread delay.

from dear-imgui.hs.

dpwiz avatar dpwiz commented on July 20, 2024

Anyway... I don't think dear-imgui can do something here as frame rate is governed by a presentation/windowing framework, picked and configured by user.

from dear-imgui.hs.

ad-si avatar ad-si commented on July 20, 2024

@cartazio Did you find a good software pattern?

from dear-imgui.hs.

cartazio avatar cartazio commented on July 20, 2024

from dear-imgui.hs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.