1GLENABLE(3G)                                                      GLENABLE(3G)
2
3
4

NAME

6       glEnable, glDisable - enable or disable server-side GL capabilities
7
8

C SPECIFICATION

10       void glEnable( GLenum cap )
11
12

PARAMETERS

14       cap  Specifies a symbolic constant indicating a GL capability.
15

C SPECIFICATION

17       void glDisable( GLenum cap )
18
19

PARAMETERS

21       cap    Specifies a symbolic constant indicating a GL capability.
22

DESCRIPTION

24       glEnable  and  glDisable  enable and disable various capabilities.  Use
25       glIsEnabled or glGet to determine the current setting of  any  capabil‐
26       ity.  The  initial  value  for  each  capability  with the exception of
27       GL_DITHER is GL_FALSE. The initial value for GL_DITHER is GL_TRUE.
28
29       Both glEnable and glDisable take a  single  argument,  cap,  which  can
30       assume one of the following values:
31
32       GL_ALPHA_TEST            If enabled, do alpha testing. See glAlphaFunc.
33
34       GL_AUTO_NORMAL           If   enabled,  generate  normal  vectors  when
35                                either GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 is
36                                used to generate vertices.  See glMap2.
37
38       GL_BLEND                 If enabled, blend the incoming RGBA color val‐
39                                ues with the values in the color buffers.  See
40                                glBlendFunc.
41
42       GL_CLIP_PLANEi           If enabled, clip geometry against user-defined
43                                clipping plane i.  See glClipPlane.
44
45       GL_COLOR_LOGIC_OP        If enabled, apply the currently selected logi‐
46                                cal  operation  to the incoming RGBA color and
47                                color buffer values. See glLogicOp.
48
49       GL_COLOR_MATERIAL        If enabled, have one or more material  parame‐
50                                ters    track    the   current   color.    See
51                                glColorMaterial.
52
53       GL_COLOR_TABLE           If enabled, preform a color  table  lookup  on
54                                the   incoming   RGBA   color   values.    See
55                                glColorTable.
56
57       GL_CONVOLUTION_1D        If enabled, perform a 1D convolution operation
58                                on    incoming   RGBA   color   values.    See
59                                glConvolutionFilter1D.
60
61       GL_CONVOLUTION_2D        If enabled, perform a 2D convolution operation
62                                on    incoming   RGBA   color   values.    See
63                                glConvolutionFilter2D.
64
65       GL_CULL_FACE             If enabled, cull polygons based on their wind‐
66                                ing in window coordinates.  See glCullFace.
67
68       GL_DEPTH_TEST            If  enabled,  do  depth comparisons and update
69                                the depth buffer. Note that even if the  depth
70                                buffer  exists and the depth mask is non-zero,
71                                the depth buffer is not updated if  the  depth
72                                test is disabled. See glDepthFunc and
73                                glDepthRange.
74
75       GL_DITHER                If enabled, dither color components or indices
76                                before they are written to the color buffer.
77
78       GL_FOG                   If enabled, blend a fog color into  the  post‐
79                                texturing color.  See glFog.
80
81       GL_HISTOGRAM             If enabled, histogram incoming RGBA color val‐
82                                ues.  See glHistogram.
83
84       GL_INDEX_LOGIC_OP        If enabled, apply the currently selected logi‐
85                                cal  operation to the incoming index and color
86                                buffer indices. See
87                                glLogicOp.
88
89       GL_LIGHTi                If enabled, include light i in the  evaluation
90                                of the lighting equation. See glLightModel and
91                                glLight.
92
93       GL_LIGHTING              If enabled, use the current  lighting  parame‐
94                                ters  to  compute  the  vertex color or index.
95                                Otherwise, simply associate the current  color
96                                or index with each vertex. See
97                                glMaterial, glLightModel, and glLight.
98
99       GL_LINE_SMOOTH           If enabled, draw lines with correct filtering.
100                                Otherwise,   draw    aliased    lines.     See
101                                glLineWidth.
102
103       GL_LINE_STIPPLE          If  enabled, use the current line stipple pat‐
104                                tern when drawing lines. See glLineStipple.
105
106       GL_MAP1_COLOR_4          If    enabled,    calls    to    glEvalCoord1,
107                                glEvalMesh1,  and  glEvalPoint1  generate RGBA
108                                values.  See glMap1.
109
110       GL_MAP1_INDEX            If    enabled,    calls    to    glEvalCoord1,
111                                glEvalMesh1,  and  glEvalPoint1 generate color
112                                indices.  See glMap1.
113
114       GL_MAP1_NORMAL           If    enabled,    calls    to    glEvalCoord1,
115                                glEvalMesh1,  and  glEvalPoint1  generate nor‐
116                                mals.  See glMap1.
117
118       GL_MAP1_TEXTURE_COORD_1  If    enabled,    calls    to    glEvalCoord1,
119                                glEvalMesh1,  and glEvalPoint1 generate s tex‐
120                                ture coordinates.  See glMap1.
121
122       GL_MAP1_TEXTURE_COORD_2  If    enabled,    calls    to    glEvalCoord1,
123                                glEvalMesh1, and glEvalPoint1 generate s and t
124                                texture coordinates.  See glMap1.
125
126       GL_MAP1_TEXTURE_COORD_3  If    enabled,    calls    to    glEvalCoord1,
127                                glEvalMesh1,  and  glEvalPoint1 generate s, t,
128                                and r texture coordinates.  See glMap1.
129
130       GL_MAP1_TEXTURE_COORD_4  If    enabled,    calls    to    glEvalCoord1,
131                                glEvalMesh1,  and  glEvalPoint1 generate s, t,
132                                r, and q texture coordinates.  See glMap1.
133
134       GL_MAP1_VERTEX_3         If    enabled,    calls    to    glEvalCoord1,
135                                glEvalMesh1,  and  glEvalPoint1 generate x, y,
136                                and z vertex coordinates.  See glMap1.
137
138       GL_MAP1_VERTEX_4         If    enabled,    calls    to    glEvalCoord1,
139                                glEvalMesh1, and glEvalPoint1 generate homoge‐
140                                neous x, y, z, and w vertex coordinates.   See
141                                glMap1.
142
143       GL_MAP2_COLOR_4          If    enabled,    calls    to    glEvalCoord2,
144                                glEvalMesh2, and  glEvalPoint2  generate  RGBA
145                                values.  See glMap2.
146
147       GL_MAP2_INDEX            If    enabled,    calls    to    glEvalCoord2,
148                                glEvalMesh2, and glEvalPoint2  generate  color
149                                indices.  See glMap2.
150
151       GL_MAP2_NORMAL           If    enabled,    calls    to    glEvalCoord2,
152                                glEvalMesh2, and  glEvalPoint2  generate  nor‐
153                                mals.  See glMap2.
154
155       GL_MAP2_TEXTURE_COORD_1  If    enabled,    calls    to    glEvalCoord2,
156                                glEvalMesh2, and glEvalPoint2 generate s  tex‐
157                                ture coordinates.  See glMap2.
158
159       GL_MAP2_TEXTURE_COORD_2  If    enabled,    calls    to    glEvalCoord2,
160                                glEvalMesh2, and glEvalPoint2 generate s and t
161                                texture coordinates.  See glMap2.
162
163       GL_MAP2_TEXTURE_COORD_3  If    enabled,    calls    to    glEvalCoord2,
164                                glEvalMesh2, and glEvalPoint2 generate  s,  t,
165                                and r texture coordinates.  See glMap2.
166
167       GL_MAP2_TEXTURE_COORD_4  If    enabled,    calls    to    glEvalCoord2,
168                                glEvalMesh2, and glEvalPoint2 generate  s,  t,
169                                r, and q texture coordinates.  See glMap2.
170
171       GL_MAP2_VERTEX_3         If    enabled,    calls    to    glEvalCoord2,
172                                glEvalMesh2, and glEvalPoint2 generate  x,  y,
173                                and z vertex coordinates.  See glMap2.
174
175       GL_MAP2_VERTEX_4         If    enabled,    calls    to    glEvalCoord2,
176                                glEvalMesh2, and glEvalPoint2 generate homoge‐
177                                neous  x, y, z, and w vertex coordinates.  See
178                                glMap2.
179
180       GL_MINMAX                If enabled, compute the  minimum  and  maximum
181                                values  of  incoming  RGBA  color values.  See
182                                glMinmax.
183
184       GL_NORMALIZE             If  enabled,  normal  vectors  specified  with
185                                glNormal  are  scaled  to  unit  length  after
186                                transformation. See glNormal.
187
188       GL_POINT_SMOOTH          If enabled, draw points with proper filtering.
189                                Otherwise,    draw    aliased   points.    See
190                                glPointSize.
191
192       GL_POLYGON_OFFSET_FILL   If enabled, and if the polygon is rendered  in
193                                GL_FILL mode, an offset is added to depth val‐
194                                ues of a polygon's fragments before the  depth
195                                comparison is performed.  See glPolygonOffset.
196
197       GL_POLYGON_OFFSET_LINE   If  enabled, and if the polygon is rendered in
198                                GL_LINE mode, an offset is added to depth val‐
199                                ues  of a polygon's fragments before the depth
200                                comparison is performed. See glPolygonOffset.
201
202       GL_POLYGON_OFFSET_POINT  If enabled, an offset is added to depth values
203                                of a polygon's fragments before the depth com‐
204                                parison is performed, if the polygon  is  ren‐
205                                dered in GL_POINT mode. See glPolygonOffset.
206
207       GL_POLYGON_SMOOTH        If  enabled, draw polygons with proper filter‐
208                                ing.  Otherwise, draw  aliased  polygons.  For
209                                correct anti-aliased polygons, an alpha buffer
210                                is needed and  the  polygons  must  be  sorted
211                                front to back.
212
213       GL_POLYGON_STIPPLE       If  enabled,  use  the current polygon stipple
214                                pattern   when   rendering    polygons.    See
215                                glPolygonStipple.
216
217       GL_POST_COLOR_MATRIX_COLOR_TABLE
218                                If  enabled,  preform  a color table lookup on
219                                RGBA color values after color matrix transfor‐
220                                mation.  See glColorTable.
221
222       GL_POST_CONVOLUTION_COLOR_TABLE
223                                If  enabled,  preform  a color table lookup on
224                                RGBA  color  values  after  convolution.   See
225                                glColorTable.
226
227       GL_RESCALE_NORMAL        If  enabled,  normal  vectors  specified  with
228                                glNormal  are  scaled  to  unit  length  after
229                                transformation. See glNormal.
230
231       GL_SEPARABLE_2D          If enabled, perform a two-dimensional convolu‐
232                                tion operation using a  separable  convolution
233                                filter  on  incoming  RGBA  color values.  See
234                                glSeparableFilter2D.
235
236       GL_SCISSOR_TEST          If enabled, discard fragments that are outside
237                                the scissor rectangle.  See glScissor.
238
239       GL_STENCIL_TEST          If  enabled, do stencil testing and update the
240                                stencil   buffer.    See   glStencilFunc   and
241                                glStencilOp.
242
243       GL_TEXTURE_1D            If  enabled, one-dimensional texturing is per‐
244                                formed (unless two- or three-dimensional  tex‐
245                                turing is also enabled).  See glTexImage1D.
246
247       GL_TEXTURE_2D            If  enabled, two-dimensional texturing is per‐
248                                formed (unless three-dimensional texturing  is
249                                also enabled). See glTexImage2D.
250
251       GL_TEXTURE_3D            If  enabled,  three-dimensional  texturing  is
252                                performed. See glTexImage3D.
253
254       GL_TEXTURE_GEN_Q         If enabled, the q texture coordinate  is  com‐
255                                puted  using  the  texture generation function
256                                defined with glTexGen.  Otherwise, the current
257                                q texture coordinate is used.  See glTexGen.
258
259       GL_TEXTURE_GEN_R         If  enabled,  the r texture coordinate is com‐
260                                puted using the  texture  generation  function
261                                defined with glTexGen.  Otherwise, the current
262                                r texture coordinate is used.  See glTexGen.
263
264       GL_TEXTURE_GEN_S         If enabled, the s texture coordinate  is  com‐
265                                puted  using  the  texture generation function
266                                defined with glTexGen.  Otherwise, the current
267                                s texture coordinate is used.  See glTexGen.
268
269       GL_TEXTURE_GEN_T         If  enabled,  the t texture coordinate is com‐
270                                puted using the  texture  generation  function
271                                defined with glTexGen.  Otherwise, the current
272                                t texture coordinate is used.  See glTexGen.
273

NOTES

275       GL_POLYGON_OFFSET_FILL,                         GL_POLYGON_OFFSET_LINE,
276       GL_POLYGON_OFFSET_POINT,  GL_COLOR_LOGIC_OP,  and GL_INDEX_LOGIC_OP are
277       available only if the GL version is 1.1 or greater.
278
279       GL_RESCALE_NORMAL, and GL_TEXTURE_3D are available only if the GL  ver‐
280       sion is 1.2 or greater.
281
282       GL_COLOR_TABLE,   GL_CONVOLUTION_1D,  GL_CONVOLUTION_2D,  GL_HISTOGRAM,
283       GL_MINMAX,                            GL_POST_COLOR_MATRIX_COLOR_TABLE,
284       GL_POST_CONVOLUTION_COLOR_TABLE, and GL_SEPARABLE_2D are available only
285       if  GL_ARB_imaging  is  returned  from  glGet  with  an   argument   of
286       GL_EXTENSIONS.
287
288       If  GL_ARB_multitexture  is  supported,  GL_TEXTURE_1D,  GL_TEXTURE_2D,
289       GL_TEXTURE_3D,  GL_TEXTURE_GEN_S,  GL_TEXTURE_GEN_T,  GL_TEXTURE_GEN_R,
290       and  GL_TEXTURE_GEN_Q  enable  or  disable the respective state for the
291       active texture unit specified with glActiveTextureARB.
292

ERRORS

294       GL_INVALID_ENUM is generated if cap is not one  of  the  values  listed
295       previously.
296
297       GL_INVALID_OPERATION  is generated if glEnable or glDisable is executed
298       between the execution of glBegin and  the  corresponding  execution  of
299       glEnd.
300

SEE ALSO

302       glActiveTextureARB(3G),        glAlphaFunc(3G),        glBlendFunc(3G),
303       glClipPlane(3G), glColorMaterial(3G), glCullFace(3G),  glDepthFunc(3G),
304       glDepthRange(3G),    glEnableClientState(3G),   glFog(3G),   glGet(3G),
305       glIsEnabled(3G),   glLight(3G),   glLightModel(3G),    glLineWidth(3G),
306       glLineStipple(3G),      glLogicOp(3G),      glMap1(3G),     glMap2(3G),
307       glMaterial(3G),   glNormal(3G),   glPointSize(3G),   glPolygonMode(3G),
308       glPolygonOffset(3G),        glPolygonStipple(3G),        glScissor(3G),
309       glStencilFunc(3G),  glStencilOp(3G),  glTexGen(3G),   glTexImage1D(3G),
310       glTexImage2D(3G), glTexImage3D(3G)
311
312
313
314
315                                                                  GLENABLE(3G)
Impressum