View Full Version : rotating a sphere in a room
12-17-2000, 08: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?
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.
12-18-2000, 06: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(...))
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.