I have a piece of code where I am changing the image for the texture. Even though the paint function(Qt) of the class is called, it doesn’t change. I can remove and bring it back, but the changes are not visible unless I destroy and recreate the object. What might I be missing?
I haven’t worked with OpenGL under Qt lately. Have you tried searching for some tips and tutorials based on the Qt interface you’re using? For instance:
From a pure OpenGL perspective: 1) Update the texture (e.g. using an FBO), 2) Render the texture onto some geometry in the window framebuffer or “blit” the texture directly onto the window framebuffer, 3) Tell the windowing system that the window framebuffer is ready to display. However, you need to learn how the Qt interface you’re using is making use of OpenGL to make the best use of it.