COpenGL::SetDepthTestMode

void SetDepthTestMode( BOOL EnableFlag );

Parameters
EnableFlag Set to TRUE if you want to enable the depth test. Set to FALSE if you want to disable the depth test.

Remarks

Use the SetDepthTestMode method function to enable or disable the Z buffer depth test.

The method function automatically sets the GL_DEPTH_BUFFER_BIT bit of the objectís clear buffers value when the depth test is enabled. The GL_DEPTH_BUFFER_BIT bit of the objectís clear buffers value is cleared when the depth test is disabled. See the SetClearValue method function for further information.

The method function is a wrapper around the OpenGL glEnable, glDisable functions.

Note:The SetDepthTestMode member function uses the current OpenGL rendering context. Ensure that the current rendering context is what you intend to use. Use wglMakeCurrent or DrawBegin member functions to set the current rendering context.

See Also

OnCreate, GetDepthTestMode