Git Product home page Git Product logo

Comments (6)

mosra avatar mosra commented on May 22, 2024

Interesting. What's the platform / compiler you're on? Is it possible that the app is running at more than 60 FPS (indicating broken VSync, probably) which is causing the delta time to be very close to zero?

from magnum-integration.

DarkContact avatar DarkContact commented on May 22, 2024

Windows / MinGW 7.3.0
VSync on
image

from magnum-integration.

mosra avatar mosra commented on May 22, 2024

If you try to drag the window

Ah! Now I see -- you mean dragging the application window, not the ImGui windows, right? This could be because, IIRC, on Windows each window drag triggers a repaint for some reason, causing drawEvent() to be called much more than @ 60 FPS.

I'll need to investigate why this frequent redraw is done, if it's needed at all and how ImGui itself handles this in its own examples. Thanks for the report, I'll ping you back once I have something.

from magnum-integration.

DarkContact avatar DarkContact commented on May 22, 2024

Yes, I mean application window. Ok. Thanks.

from magnum-integration.

mosra avatar mosra commented on May 22, 2024

Unfortunately I don't really have a solution for this. SDL has a Window-specific bug/misfeature, reported back in 2014 and not fixed since, where it hangs all event processing for the time where you drag or resize the window. After that, it flushes the event queue, causing repaint events and everything else to happen immediately after each other. That ImGui crashes is only a consequence, it's very likely to cause serious misbehavior elsewhere as well -- I hit this most recently with mosra/magnum#423 when trying to implement DPI scaling change events, there it delays the window resize to when you release the mouse again, not nice.

I am monitoring that bug, hoping something will happen in this decade at least.

Two suggestions -- either don't drag windows with ImGui in it, or switch to GlfwApplication, GLFW doesn't suffer from this problem at all.

from magnum-integration.

mosra avatar mosra commented on May 22, 2024

Worked around in e7dc17a basically the same way you suggested -- there's nothing happening about this at on the SDL side at all (the bug is milestoned for SDL 2.1, who knows when that happens), so let's do a fix here instead.

from magnum-integration.

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.