'\" t .\" Title: glEnable .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/08/2011 .\" Manual: OpenGL 3.3 .\" Source: OpenGL 3.3 .\" Language: English .\" .TH "GLENABLE" "3G" "03/08/2011" "OpenGL 3.3" "OpenGL 3\&.3" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glEnable \- enable or disable server\-side GL capabilities .SH "C SPECIFICATION" .HP \w'void\ glEnable('u .BI "void glEnable(GLenum\ " "cap" ");" .SH "PARAMETERS" .PP \fIcap\fR .RS 4 Specifies a symbolic constant indicating a GL capability\&. .RE .SH "C SPECIFICATION" .HP \w'void\ glDisable('u .BI "void glDisable(GLenum\ " "cap" ");" .SH "PARAMETERS" .PP \fIcap\fR .RS 4 Specifies a symbolic constant indicating a GL capability\&. .RE .SH "C SPECIFICATION" .HP \w'void\ glEnablei('u .BI "void glEnablei(GLenum\ " "cap" ", GLuint\ " "index" ");" .SH "PARAMETERS" .PP \fIcap\fR .RS 4 Specifies a symbolic constant indicating a GL capability\&. .RE .PP \fIindex\fR .RS 4 Specifies the index of the swtich to enable\&. .RE .SH "C SPECIFICATION" .HP \w'void\ glDisablei('u .BI "void glDisablei(GLenum\ " "cap" ", GLuint\ " "index" ");" .SH "PARAMETERS" .PP \fIcap\fR .RS 4 Specifies a symbolic constant indicating a GL capability\&. .RE .PP \fIindex\fR .RS 4 Specifies the index of the swtich to disable\&. .RE .SH "DESCRIPTION" .PP \fBglEnable\fR and \fBglDisable\fR() enable and disable various capabilities\&. Use \fBglIsEnabled\fR() or \fBglGet\fR() to determine the current setting of any capability\&. The initial value for each capability with the exception of \fBGL_DITHER\fR and \fBGL_MULTISAMPLE\fR is \fBGL_FALSE\fR\&. The initial value for \fBGL_DITHER\fR and \fBGL_MULTISAMPLE\fR is \fBGL_TRUE\fR\&. .PP Both \fBglEnable\fR and \fBglDisable\fR() take a single argument, \fIcap\fR, which can assume one of the following values: .PP Some of the GL\*(Aqs capabilities are indicated\&. \fBglEnablei\fR and \fBglDisablei\fR enable and disable indexed capabilities\&. .PP \fBGL_BLEND\fR .RS 4 .sp If enabled, blend the computed fragment color values with the values in the color buffers\&. See \fBglBlendFunc\fR()\&. .RE .PP \fBGL_CLIP_DISTANCE\fR\fIi\fR .RS 4 .sp If enabled, clip geometry against user\-defined half space \fIi\fR\&. .RE .PP \fBGL_COLOR_LOGIC_OP\fR .RS 4 .sp If enabled, apply the currently selected logical operation to the computed fragment color and color buffer values\&. See \fBglLogicOp\fR()\&. .RE .PP \fBGL_CULL_FACE\fR .RS 4 .sp If enabled, cull polygons based on their winding in window coordinates\&. See \fBglCullFace\fR()\&. .RE .PP \fBGL_DEPTH_CLAMP\fR .RS 4 .sp If enabled, the \-wc≤zc≤wc plane equation is ignored by view volume clipping (effectively, there is no near or far plane clipping)\&. See \fBglDepthRange\fR()\&. .RE .PP \fBGL_DEPTH_TEST\fR .RS 4 .sp If enabled, do depth comparisons and update the depth buffer\&. Note that even if the depth buffer exists and the depth mask is non\-zero, the depth buffer is not updated if the depth test is disabled\&. See \fBglDepthFunc\fR() and \fBglDepthRange\fR()\&. .RE .PP \fBGL_DITHER\fR .RS 4 .sp If enabled, dither color components or indices before they are written to the color buffer\&. .RE .PP \fBGL_LINE_SMOOTH\fR .RS 4 .sp If enabled, draw lines with correct filtering\&. Otherwise, draw aliased lines\&. See \fBglLineWidth\fR()\&. .RE .PP \fBGL_MULTISAMPLE\fR .RS 4 .sp If enabled, use multiple fragment samples in computing the final color of a pixel\&. See \fBglSampleCoverage\fR()\&. .RE .PP \fBGL_POLYGON_OFFSET_FILL\fR .RS 4 .sp If enabled, and if the polygon is rendered in \fBGL_FILL\fR mode, an offset is added to depth values of a polygon\*(Aqs fragments before the depth comparison is performed\&. See \fBglPolygonOffset\fR()\&. .RE .PP \fBGL_POLYGON_OFFSET_LINE\fR .RS 4 .sp If enabled, and if the polygon is rendered in \fBGL_LINE\fR mode, an offset is added to depth values of a polygon\*(Aqs fragments before the depth comparison is performed\&. See \fBglPolygonOffset\fR()\&. .RE .PP \fBGL_POLYGON_OFFSET_POINT\fR .RS 4 .sp If enabled, an offset is added to depth values of a polygon\*(Aqs fragments before the depth comparison is performed, if the polygon is rendered in \fBGL_POINT\fR mode\&. See \fBglPolygonOffset\fR()\&. .RE .PP \fBGL_POLYGON_SMOOTH\fR .RS 4 .sp If enabled, draw polygons with proper filtering\&. Otherwise, draw aliased polygons\&. For correct antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back\&. .RE .PP \fBGL_PRIMITIVE_RESTART\fR .RS 4 .sp Enables primitive restarting\&. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the primitive restart index\&. See \fBglPrimitiveRestartIndex\fR()\&. .RE .PP \fBGL_SAMPLE_ALPHA_TO_COVERAGE\fR .RS 4 .sp If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location\&. The temporary coverage value is then ANDed with the fragment coverage value\&. .RE .PP \fBGL_SAMPLE_ALPHA_TO_ONE\fR .RS 4 .sp If enabled, each sample alpha value is replaced by the maximum representable alpha value\&. .RE .PP \fBGL_SAMPLE_COVERAGE\fR .RS 4 .sp If enabled, the fragment\*(Aqs coverage is ANDed with the temporary coverage value\&. If \fBGL_SAMPLE_COVERAGE_INVERT\fR is set to \fBGL_TRUE\fR, invert the coverage value\&. See \fBglSampleCoverage\fR()\&. .RE .PP \fBGL_SCISSOR_TEST\fR .RS 4 .sp If enabled, discard fragments that are outside the scissor rectangle\&. See \fBglScissor\fR()\&. .RE .PP \fBGL_STENCIL_TEST\fR .RS 4 .sp If enabled, do stencil testing and update the stencil buffer\&. See \fBglStencilFunc\fR() and \fBglStencilOp\fR()\&. .RE .PP \fBGL_TEXTURE_CUBE_MAP_SEAMLESS\fR .RS 4 .sp If enabled, modifies the way sampling is performed on cube map textures\&. See the spec for more information\&. .RE .PP \fBGL_PROGRAM_POINT_SIZE\fR .RS 4 .sp If enabled and a vertex or geometry shader is active, then the derived point size is taken from the (potentially clipped) shader builtin \fBgl_PointSize\fR and clamped to the implementation\-dependent point size range\&. .RE .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fIcap\fR is not one of the values listed previously\&. .PP \fBGL_INVALID_VALUE\fR is generated by \fBglEnablei\fR and \fBglDisablei\fR if \fIindex\fR is greater than or equal to the number of indexed capabilities for \fIcap\fR\&. .SH "NOTES" .PP \fBGL_PRIMITIVE_RESTART\fR is available only if the GL version is 3\&.1 or greater\&. .PP \fBGL_TEXTURE_CUBE_MAP_SEAMLESS\fR is available only if the GL version is 3\&.2 or greater\&. .PP Any token accepted by \fBglEnable\fR or \fBglDisable\fR is also accepted by \fBglEnablei\fR and \fBglDisablei\fR, but if the capability is not indexed, the maximum value that \fIindex\fR may take is zero\&. .PP In general, passing an indexed capability to \fBglEnable\fR or \fBglDisable\fR will enable or disable that capability for all indices, resepectively\&. .SH "ASSOCIATED GETS" .PP \fBglIsEnabled\fR() .PP \fBglGet\fR() .SH "SEE ALSO" .PP \fBglActiveTexture\fR(), \fBglBlendFunc\fR(), \fBglCullFace\fR(), \fBglDepthFunc\fR(), \fBglDepthRange\fR(), \fBglGet\fR(), \fBglIsEnabled\fR(), \fBglLineWidth\fR(), \fBglLogicOp\fR(), \fBglPointSize\fR(), \fBglPolygonMode\fR(), \fBglPolygonOffset\fR(), \fBglSampleCoverage\fR(), \fBglScissor\fR(), \fBglStencilFunc\fR(), \fBglStencilOp\fR(), \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexImage3D\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 2010 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&.