QARenderStart
You can use theQARenderStartfunction to initialize a draw context before an engine performs any rendering into that context.
#define QARenderStart(drawContext,dirtyRect,initialContext) \ (drawContext)->renderStart (drawContext,dirtyRect,initialContext)
drawContext- A draw context.
dirtyRect- The minimum area of the specified draw context to clear, or the value
NULL.initialContext- A previously cached draw context, or the value
NULL.DESCRIPTION
TheQARenderStartfunction performs any operations necessary to initialize the draw context specified by thedrawContextparameter. This includes clearing the z buffer and the color buffers of the draw context. If the value of theinitialContextparameter isNULL, thenQARenderStartclears the z buffer to 1.0 and sets the color buffers to the values of thekQATag_ColorBG_a,kQATag_ColorBG_r,kQATag_ColorBG_g, andkQATag_ColorBG_bdraw context state variables. If, however, the value of theinitialContextparameter is notNULL, thenQARenderStartuses the previously cached draw context specified by that parameter to initialize the draw context specified by thedrawContextparameter.The
dirtyRectparameter indicates the minimum area of the specified draw context to clear on initialization. If the value of thedirtyRectparameter isNULL, the entire draw context is cleared. If the value of thedirtyRectparameter is notNULL, it indicates the rectangle in the draw context to clear. Some drawing engines may exhibit improved performance when an area that is smaller than the entire draw context rectangle is passed. However, the interpretation of thedirtyRectparameter is dependent on the drawing engine, which may choose to initialize the entire draw context. As a result, you should not use this parameter as a means to avoid clearing all of a draw context or to perform incremental rendering. Instead, you should use theinitialContextparameter to achieve such effects.SPECIAL CONSIDERATIONS
You should callQARenderStartbefore performing any rendering operations in the specified draw context, and you should call eitherQARenderEndto signal the end of rendering operations orQARenderAbortto cancel rendering operations. However, when a drawing engine is performing OpenGL rendering, theQARenderStartfunction operates just like the OpenGL functionglClear. In OpenGL mode, it is not necessary that a call toQARenderStartalways be balanced by a matching call toQARenderEnd, and drawing commands may occur at any time.SEE ALSO
See "Using a Draw Context as a Cache" (page 1-20) for information on creating a draw context cache (that is, a draw context you can use as the initial context specified in theinitialContextparameter).