tags:

views:

79

answers:

2

Is it possible to not clear entire screen when using glClear() function? I need to clear only a part of the screen to save some rendering time, otherwise i would have to redraw half of the screen every frame, even if nothing is happening on the other half.

Of course this should be done as quickly (or quickier) as the glClear() is now.

A: 

Draw a giant quad :) Apply this to just half your screen.

http://www.opengl.org/resources/faq/technical/transformations.htm#tran0090

glowcoder
isnt drawing quad a bit too slow for this?
Newbie
+3  A: 

You might want to look into glScissor. From the documentation:

While scissor test is enabled, only pixels that lie within the scissor box can be modified by drawing commands.

TreDubZedd
and specifically, from the Clear documentation: [...], the scissor test, [...] affect the operation of glClear. +1.
Bahbar