View Full Version : Re-sizing problem
07-06-2011, 03:32 AM
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.
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.
07-06-2011, 03:34 AM
Could u show us ur resize/relevant code please? We donot have magic eyes that could extract the code from the image :P
07-06-2011, 03:41 AM
Oh sorry here is the Code : http://dl.dropbox.com/u/15084870/Triangle.cpp
It's a Triangle sample form CodeBible OpenGl
07-06-2011, 03:53 AM
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
07-06-2011, 04:47 AM
Ok when i add glFinish it doesn't change anything the same. And Alpha works thanks :)
07-06-2011, 04:54 AM
Could u put glFinish before glutSwapBuffers call and see if it helps.
07-06-2011, 04:55 AM
07-06-2011, 05:06 AM
The code that u have given works fine on my machine.
07-06-2011, 05:14 AM
You run this on Linux? Maybe something is bad configured i will try if anyone has this problem and solve it please write :)
Thanks a lot!
07-06-2011, 05:34 AM
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);
07-06-2011, 05:42 AM
XD it blocks my computer i cant move even window :D
07-06-2011, 05:47 AM
DO u get any assertion? check the console output.
07-06-2011, 06:42 AM
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.
07-07-2011, 02:29 AM
OK thanks guys i think is's a bug in driver.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.