'\" t .\" Title: glEnable .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLENABLE" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * 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" ");" .HP \w'void\ glDisable('u .BI "void glDisable(GLenum\ " "cap" ");" .HP \w'void\ glEnablei('u .BI "void glEnablei(GLenum\ " "cap" ", GLuint\ " "index" ");" .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 switch to disable (for \fBglEnablei\fR and \fBglDisablei\fR only)\&. .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 indexed\&. \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_DEBUG_OUTPUT\fR .RS 4 .sp If enabled, debug messages are produced by a debug context\&. When disabled, the debug message log is silenced\&. Note that in a non\-debug context, very few, if any messages might be produced, even when \fBGL_DEBUG_OUTPUT\fR is enabled\&. .RE .PP \fBGL_DEBUG_OUTPUT_SYNCHRONOUS\fR .RS 4 .sp If enabled, debug messages are produced synchronously by a debug context\&. If disabled, debug messages may be produced asynchronously\&. In particular, they may be delayed relative to the execution of GL commands, and the debug callback function may be called from a thread other than that in which the commands are executed\&. See \fBglDebugMessageCallback\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_FRAMEBUFFER_SRGB\fR .RS 4 .sp If enabled and the value of \fBGL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING\fR for the framebuffer attachment corresponding to the destination buffer is \fBGL_SRGB\fR, the R, G, and B destination color values (after conversion from fixed\-point to floating\-point) are considered to be encoded for the sRGB color space and hence are linearized prior to their use in blending\&. .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_PRIMITIVE_RESTART_FIXED_INDEX\fR .RS 4 .sp Enables primitive restarting with a fixed index\&. 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 fixed primitive index for the specified index type\&. The fixed index is equal to 2n−1 where \fIn\fR is equal to 8 for \fBGL_UNSIGNED_BYTE\fR, 16 for \fBGL_UNSIGNED_SHORT\fR and 32 for \fBGL_UNSIGNED_INT\fR\&. .RE .PP \fBGL_RASTERIZER_DISCARD\fR .RS 4 .sp If enabled, primitives are discarded after the optional transform feedback stage, but before rasterization\&. Furthermore, when enabled, \fBglClear\fR(), \fBglClearBufferData\fR(), \fBglClearBufferSubData\fR(), \fBglClearTexImage\fR(), and \fBglClearTexSubImage\fR() are ignored\&. .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_SAMPLE_SHADING\fR .RS 4 .sp If enabled, the active fragment shader is run once for each covered sample, or at fraction of this rate as determined by the current value of \fBGL_MIN_SAMPLE_SHADING_VALUE\fR\&. See \fBglMinSampleShading\fR()\&. .RE .PP \fBGL_SAMPLE_MASK\fR .RS 4 .sp If enabled, the sample coverage mask generated for a fragment during rasterization will be ANDed with the value of \fBGL_SAMPLE_MASK_VALUE\fR before shading occurs\&. See \fBglSampleMaski\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, cubemap textures are sampled such that when linearly sampling from the border between two adjacent faces, texels from both faces are used to generate the final sample value\&. When disabled, texels from only a single face are used to construct the final sample value\&. .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 \fBGL_PRIMITIVE_RESTART_FIXED_INDEX\fR is available only if the GL version is 4\&.3 or greater\&. .PP \fBGL_DEBUG_OUTPUT\fR and \fBGL_DEBUG_OUTPUT_SYNCHRONOUS\fR are available only if the GL version is 4\&.3 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 "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ \fBglDisable\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglDisablei\fR T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglEnable\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglEnablei\fR T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp 1 .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 2011\-2014 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[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2011-2014 Khronos Group .br