Why isn't the window redrawn?

Started by
2 comments, last by GCoda 18 years, 4 months ago
Hi, I have problem getting the opengl to render in windows. My code renders the the initial screen alright but after that no redrawing occurs. What else is needed (than these three lines) to make the window update in regular basis?

glutReshapeFunc(&OpenGLRenderer::sresize);
glutDisplayFunc(&OpenGLRenderer::srender);
glutMainLoop(); // why doesn't glut call the Display Func?
Thanks.
Jesus loves you!
Advertisement
I have never used glut, and this may be a longshot but, are you using glutSwapBuffers or something similar to swap front and back buffers?
The display func will only be called when redrawing is required. That means something about the window must have changed, because glut can't know about anything but that. Use the idle func instead.
f@dzhttp://festini.device-zero.de
Thanks for the replies!
You we're right Trienco, I had to use the idle callback.
Jesus loves you!

This topic is closed to new replies.

Advertisement