Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to use GLFW.WaitEvents instead of GLFW.PollEvents in the render loop? #164

Closed
Sukhoverkhaya opened this issue Feb 14, 2025 · 2 comments · Fixed by #166
Closed

Comments

@Sukhoverkhaya
Copy link
Contributor

Hello!

In older versions of CImGui I could customize the Renderer.jl file to set my own rendering rules, in particular i used glfwWaitEvents instead of glfwPollEvents to optimize event handling. How can I set this option in the new version, where renderloop function from GlfwOpenGLBackend extension uses GLFW.PollEvents by default?

GLFW.PollEvents()

@JamesWrigley
Copy link
Member

There is no way to customize it right now, but we could just add an option to use WaitEvents() instead of PollEvents() (feel free to open a PR for it). Though if you've customized your renderer a lot then it might be best to keep using it, I don't think there's any restrictions in CImGui.jl about how a context is used in a renderloop. There is built-in support for ImGuiTestEngine.jl but that wouldn't be hard to add to a custom renderloop.

@Sukhoverkhaya
Copy link
Contributor Author

Got it, thank you! I'll create the appropriate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants