cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
539 stars 59 forks source link

explicitly paint to see effect of shader change #343

Closed pkarasev3 closed 7 years ago

pkarasev3 commented 7 years ago

At least for me on windows 10 with either OpenGL 3.x or 4.x, the window did not get updated until dragging off-screen or minimizing. Explicitly calling paint() remedies this; the window changes shaders instantaneously on F5.

scheibel commented 7 years ago

I think there is actually an error. However, your code immediately requested a redraw. I implemented a version that uses the updateGL member function of the superclass that post a repaint event on the event queue. I'm not sure which of both is the preferred behavior, but can you test if my fix also works for you?

scheibel commented 7 years ago

Looks good, I'll merge it. Thanks for contributing.