OpenGL doublebuffer problem...

Started by
2 comments, last by Aragorn 23 years, 11 months ago
Hi I''m new to OpenGL and writing my first ''test'' programm and I have the following problem: The program is supposed to show a rotating cube. With one buffer and glFlush() everything worked well. But then I added the PFD_DOUBLEBUFFER flag and SwapBuffers(hdc) funcion. And now the cube don''t rotate anymore, it''s shown in it''s start position but don''t move. Just when I resize the window it''s shown in the position it would have reached in the time. I''don''t know where the fault is, may be you know. Please help me P.S.: SwapBuffers() is called everytime it should and return TRUE
May the force be with you
Advertisement
You can find "rotating cube" example in Nehe tutorials.
sound like you call your "render scene" in windows callback handler under REDRAW/REPAINT/RESIZE....??? or you use GLUT to trigger repaint in a wrong way....???

you have something like:

init opengl

while( not exit )
{
clear buffer
render scene
swap buffer
}

??












Damn...forgot to enter my user name......
replace line:

you have something like:

with

you should do something like:

Ries

This topic is closed to new replies.

Advertisement