firegun9
02-28-2005, 07:08 PM
I have a render method like this:
(cnt is a global variable)
render(){
...
cnt++;
glutWireCube(1.0);
if(cnt > 1000)
glutSolidCube(1.0);
glutSwapBuffers();
}
When cnt>1000, the wire cube disapeared, and the solid cube isn't drawn.
Is it not allowed to have brance statement in the callback function for glutDisplayFunc()?
(cnt is a global variable)
render(){
...
cnt++;
glutWireCube(1.0);
if(cnt > 1000)
glutSolidCube(1.0);
glutSwapBuffers();
}
When cnt>1000, the wire cube disapeared, and the solid cube isn't drawn.
Is it not allowed to have brance statement in the callback function for glutDisplayFunc()?