PDA

View Full Version : rotating a sphere in a room



tanvi
12-17-2000, 09:57 AM
I have a sphere in a middle of a room. The room has three walls around it and each one is a quad with a texture map on it. When I rotate the sphere the whole room redisplays and I don't want to walls to keep redrawing. The walls and sphere are drawn in my display function and the code to rotate the sphere is in the init function. Any ideas?

thanks.

12-17-2000, 12:36 PM
I could be wrong, but put your code for drawing the walls in main() and leave the sphere code in the display func so that the walls only get drawn once.

softland_gh
12-18-2000, 07:01 AM
Do you mean that the window is flickering? If so, are you using double buffering. It reduces flickering very much, because it hides the details of drawing the whole scene. Actually the whole scene must be redrawn because I suppose you are clearing the color and depth buffers (glClear(...))