Here is a zip archive containing the code I am talking about. If you uncomment the ofstream declaration in ShaderDemo.h, things display again.
What should display is a spinning red rounded rectangle.
Here is a zip archive containing the code I am talking about. If you uncomment the ofstream declaration in ShaderDemo.h, things display again.
What should display is a spinning red rounded rectangle.
Bump. Just trying to get someone's attention.
I took a very quick look and the first thing that I noticed is that you are missing the paintGL()
method. I see that you are doing the paint through a paint event but I think you have to have a paintGL as that gets called from the internals.
I would move your paint code into paintGL and see if that works. I don't use the paintEvent but I have seen code where both the paintGL and paintEvent exist so if there is information that you want to capture from the paintEvent, you can have both but the drawing should be done in paintGL.
Though none of this really explains why the code would have been working before.
I am a dummy. I didn't initialize the rotation data member, which meant that sometimes, it would be initialized to garbage and rotate out of view.
Bookmarks