GLFW window resize lag

Hi folks, I’m writing an OpenGL program (because Vulkan doesn’t seem to be ready for my platform which is the Raspberry pi :).
Anyway, I’ve switched from GLUT to GLFW and I discovered that the window resize behavior of GLFW is much more laggy GLUT’s.
I can perceive a delay of 1/4 to 1/2 second between resizing a window and my drawing code being called.
So I am curious, is there an alternative to GLUT and GLFW and is fast like GLUT but modern and flexible like GLFW?

Does your application redraw continuously, or only upon events (input, resize, etc)?

If it’s the latter, are you sure it isn’t just the GLFW version being much slower? Compare OpenGL versions and framebuffer properties between the two. E.g. if GLFW is using a multi-sample framebuffer and GLUT isn’t, that will probably affect performance.

Have you tried to determine where the delay occurs? Does the resize callback get invoked immediately or is that delayed?

How are you receiving events? glfwPollEvents or glfwWaitEvents? If you’re polling, are you doing any other work when no events are available?

How are you handling redraw? Are you calling the redraw directly function from the event callbacks, or are you postponing redraw until the event queue is empty? Are you calling the redraw function from the resize callback or using a refresh callback?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.