COpenGL::SetRenderingContextCheckin

void SetRenderingContextChecking( int OnOffFlag );

Parameters

OnOffFlag Set to 1 to set enable rendering context checking, set to 0 to disable rendering context checking.

Remarks

When the rendering context checking is enabled, a lot of methods in the COpenGL object sets the current OpenGL rendering context to OpenGL rendering context associated with itself before issuing OpenGL API functions. This approach is not good for an application performance. To improve the performance, use the SetRenderingContextChecking method to disable the rendering context checking. However, when the rendering context checking is disabled, the application must make sure the correct rendering context is used while calling COpenGL object methods.

The rendering context checking is enabled during COpenGL object initialization.

See Also

GetRenderingContextChecking, wglMakeCurrent