user3178756 user3178756 - 8 months ago 90
C++ Question

update Opengl window continuously

I'm using OpenGL and GLEW to map a texture on a quad and render it. I want to change the texture for each frame and update the window continuously. How can I force it to update continuously?

Edit: I should have mentioned that I am using Qt too.


If you are using qt to create the window and manage the events like when the mouse is moving, it may cause the application to wait for an event to happen before re-drawing the window. I think you could use a QTimer object and connect its timeout signal to your update function.

Otherwise, if you handle events with some waitEvent() function, change it with a non-blocking version.