glEnable Function

Syntax

GL_APICALL void GL_APIENTRY glEnable(
     GLenum cap
);

Parameters

Name Description
in cap Name of feature to enable

Return Values

No values are returned.

Description

Enables specific GL features.

You can set cap to the following values. You cannot specify GL_EARLY_DEPTH_TEST_DMP from POD.

GL_COLOR_LOGIC_OPEnables logical operations on pixels.
GL_BLENDEnables the blend feature.
GL_DEPTH_TESTEnables depth tests.
GL_STENCIL_TESTEnables stencil tests.
GL_SCISSOR_TESTEnables scissoring.
GL_CULL_FACEEnables culling.
GL_POLYGON_OFFSET_FILLEnables polygon offsets.
GL_EARLY_DEPTH_TEST_DMPEnables early depth tests. If this function is enabled, the viewport offset (X, Y) must be (0, 0).
GL_DEPTH_STENCIL_COPY_DMPEnables the depth stencil copy feature.

This function generates the following errors.

GL_INVALID_ENUMThe cap argument was set to an invalid value.
GL_INVALID_OPERATIONThis function was called without any command-list objects bound.

Revision History

2011/02/07
Added mention of the limitation on the viewport offset when the early depth test is enabled.
2010/08/12
Added description of GL_DEPTH_STENCIL_COPY_DMP for the depth stencil copy feature.
2010/01/07
Initial version.

CONFIDENTIAL