Git Product home page Git Product logo

Comments (6)

ocornut avatar ocornut commented on May 28, 2024

That’s unrelated to dear imgui and wouldn’t be an API handled by us, but you migbt be asking the question backward. If you mean delay between window and mouse cursor, it is because you have hardware cursor enabled. Reducing latency is up to and your rendering system setup.

It may be advantageous to disable hardware cursor when dragging certain items.

from imgui.

up-to-you avatar up-to-you commented on May 28, 2024

Yep, already got it, not an issue of imgui. But, if i run simple SDL hello world project, like this one https://lazyfoo.net/tutorials/SDL/01_hello_SDL/index2.php the cursor latency inside SDL window exactly the same as in my OS. And if i run imgui demo with SDL backend the cursor is slightly laggy and overall trying to investigate other GUIs built with Imgui the mouse latency always cause wrist fatigue. It's always require more effort to move mouse cursor somewhere inside Imgui window.

from imgui.

ocornut avatar ocornut commented on May 28, 2024

Do you mean it feels laggy when simply moving the mouse (not dragging a window or a tooltip) ? There shouldn’t be a difference in this situation.

from imgui.

PathogenDavid avatar PathogenDavid commented on May 28, 2024

imgui_impl_sdl2 is just using SDL_SetCursor with cursors created via SDL_CreateSystemCursor. We aren't doing anything special in that regard.

But, if i run simple SDL hello world project, like this one https://lazyfoo.net/tutorials/SDL/01_hello_SDL/index2.php the cursor latency inside SDL window exactly the same as in my OS.

Is this still the case for a non-trivial SDL app? (Or a simulated one by adding something like usleep(50 * 1000); to the main loop?)

from imgui.

up-to-you avatar up-to-you commented on May 28, 2024

@ocornut yep, when simply moving. @PathogenDavid thats what im talking about (about your joke), the rendering and mouse handling is all about main loop, but how can i detach mouse handling from main loop ? How does other GUIs make rendering not affect mouse movement (and you don't feel the difference between movement out of window and inside) and still able to handle mouse events ?

from imgui.

PathogenDavid avatar PathogenDavid commented on May 28, 2024

(about your joke)

It wasn't intended as a joke 😅

To clarify: I'm asking if this happens with other SDL apps that aren't using Dear ImGui. The part in parenthesis was meant as a suggestion that you could just modify the example app you linked in order to rule Dear ImGui out.

It would be helpful to know since if it happens in other SDL apps it might be an SDL issue.

how can i detach mouse handling from main loop ?

It's not expected that they're attached in the first place, this should be regarded as a bug with something.

from imgui.

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.