PDA

View Full Version : Optimizing redraw



AngelT
11-22-2004, 05:13 AM
Hello.
I need to optimize drawing times. I'm using OpenGL in a WIndows environment.
I have a scene made up of several objects. One of them is changed in position in a mouse_move event. How can I optimize the rendering so as not to redraw all the objects in every mouse_move?
Can I redraw all the scene once, and just the object moved in the mouse_move? How?

Thanks

ioquan
11-22-2004, 07:02 AM
Most 3d applications redraw the entire scene on every frame. Gone are the days of sprite graphics and only redrawing part of the screen. However, it would be possible to do what you want to do by rendering to a texture. Render all of the things that dont need to be updated each frame to a texture. Display the texture by drawing a 2d textured quad to cover your screen. Then draw the moving objects on top of it as normal.

plasmonster
11-22-2004, 08:13 AM
This might interest you:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt

The OpenGL candy store:
http://oss.sgi.com/projects/ogl-sample/registry/

endash
11-22-2004, 01:41 PM
I think ioquan has the right idea. How many milliseconds does it take to draw a frame right now?