Re-sizing problem

Hello when i re-size my GLUT window it blinks its very annoying. I have Ubuntu and installed fresh ATI drivers with Open GL 4.1. Also on start if I just move window my triangle disappear.
PICTURE:

  1. On start it looks: http://dl.dropbox.com/u/15084870/Screenshot-3.png

  2. When i move it: http://dl.dropbox.com/u/15084870/Screenshot-4.png

  3. When i’m re-sizing (you can see thie pice shows what’s under the GLUT window and it blinks): http://dl.dropbox.com/u/15084870/Screenshot-5.png

Thanks a lot.

PS. Transparency on Linux doesn’t work? I try to set alpha to Triangle but it doesn’t work the same in Qt.

Could u show us ur resize/relevant code please? We donot have magic eyes that could extract the code from the image :stuck_out_tongue:

Oh sorry here is the Code : http://dl.dropbox.com/u/15084870/Triangle.cpp

It’s a Triangle sample form CodeBible OpenGl

Hi,
For the main problem, could u try adding glFinish() after glutSwapBuffers call and see if this helps. For transparency to work, you need to enable blending


glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

Ok when i add glFinish it doesn’t change anything the same. And Alpha works thanks :slight_smile:

Could u put glFinish before glutSwapBuffers call and see if it helps.

The Same

The code that u have given works fine on my machine.

You run this on Linux? Maybe something is bad configured i will try if anyone has this problem and solve it please write :slight_smile:

Thanks a lot!

nope I am on windows 7, one thing you can do is add this line at the start of the render function and see if it gives an assertion.


//include <cassert> at the top ofcourse
assert(glGetError() == GL_NO_ERROR);

XD it blocks my computer i cant move even window :smiley:

DO u get any assertion? check the console output.

You might have a driver bug.
Also your resize function should have projection and modelview initialization.
Your render function might also lack some view statement.

OK thanks guys i think is’s a bug in driver.