View Full Version : Redraw the whole scene?

03-09-2004, 07:42 PM
Hi. I have just started with OpenGl and had this query that if I change my viewpoint using gluLookAt(), do I have to redraw the entire scene in the display callback. Likewise, if i have to transform just a single object in a complex scene, will the whole scene need to be redrawn?
Same question is with drawing multiple viewports. If i draw to two viewports the same scene, perhaps with some different orientation, then the modelview transformtions need to be repeated for each of them?

03-09-2004, 07:52 PM
You are thinking that there is some magic you can do to load a scene into your graphics card, change the display and instantly update it. It is nowhere near that simple.
In the general case you have to redraw. If you are only changing some of the data, you can use VBOs for higher performance. If you are only changing the perspective, you can define drawlists (for frequently rendered objects, in this case the whole thing) and draw them to both screens. I'm not convinced it saves much. The objects are packaged up in the engine and sent twice to the card, for a minimal savings in call overhead. The savings is more apparent when you have lots of copies of one small object, but even so, it's not a big savings. The big cost, the rendering, has to be done each time.