void DrawBegin( BOOL ClearFlag = TRUE );



Specifies whether the COpenGL objectís rendering context should be cleared by the OpenGL glClear( GetClearValue () ) function.


The DrawBegin method function prepares the COpenGL object for drawing operations into associated rendering context.

Each call to DrawBegin must have a corresponding call to the DrawEnd method function. It is possible to call the DrawBegin function when another objectís DrawBegin call is not Ďfinishedí with its corresponding DrawEnd call. However, in this case, only the first objectís DrawBegin call stores the current OpenGL rendering context internally and sets the current rendering context to the objectís rendering context. The next such objectís DrawBegin calls have no effect.

If a different operation than that which DrawBegin, DrawEnd provides is required then the application must handle the objectís rendering context activation itself using the wglMakeCurrent calls.

See Also

DrawEnd, wglMakeCurrent