ReactOS 0.4.15-dev-8236-g99f0937
enable.c File Reference
#include <string.h>
#include "context.h"
#include "depth.h"
#include "enable.h"
#include "light.h"
#include "dlist.h"
#include "macros.h"
#include "stencil.h"
#include "types.h"
#include "vbfill.h"
Include dependency graph for enable.c:

Go to the source code of this file.

Functions

static void gl_enable (GLcontext *ctx, GLenum cap, GLboolean state)
 
void gl_Enable (GLcontext *ctx, GLenum cap)
 
void gl_Disable (GLcontext *ctx, GLenum cap)
 
GLboolean gl_IsEnabled (GLcontext *ctx, GLenum cap)
 
void gl_client_state (GLcontext *ctx, GLenum cap, GLboolean state)
 
void gl_EnableClientState (GLcontext *ctx, GLenum cap)
 
void gl_DisableClientState (GLcontext *ctx, GLenum cap)
 

Function Documentation

◆ gl_client_state()

void gl_client_state ( GLcontext ctx,
GLenum  cap,
GLboolean  state 
)

Definition at line 613 of file enable.c.

614{
615 switch (cap) {
616 case GL_VERTEX_ARRAY:
617 ctx->Array.VertexEnabled = state;
618 break;
619 case GL_NORMAL_ARRAY:
620 ctx->Array.NormalEnabled = state;
621 break;
622 case GL_COLOR_ARRAY:
623 ctx->Array.ColorEnabled = state;
624 break;
625 case GL_INDEX_ARRAY:
626 ctx->Array.IndexEnabled = state;
627 break;
629 ctx->Array.TexCoordEnabled = state;
630 break;
632 ctx->Array.EdgeFlagEnabled = state;
633 break;
634 default:
635 gl_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" );
636 }
637}
static int state
Definition: maze.c:121
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
#define GL_TEXTURE_COORD_ARRAY
Definition: gl.h:206
#define GL_COLOR_ARRAY
Definition: gl.h:204
#define GL_NORMAL_ARRAY
Definition: gl.h:203
#define GL_INDEX_ARRAY
Definition: gl.h:205
#define GL_VERTEX_ARRAY
Definition: gl.h:202
#define GL_EDGE_FLAG_ARRAY
Definition: gl.h:207
#define GL_INVALID_ENUM
Definition: gl.h:694
GLenum cap
Definition: glext.h:9639

Referenced by gl_DisableClientState(), and gl_EnableClientState().

◆ gl_Disable()

void gl_Disable ( GLcontext ctx,
GLenum  cap 
)

Definition at line 469 of file enable.c.

470{
472}
static void gl_enable(GLcontext *ctx, GLenum cap, GLboolean state)
Definition: enable.c:118
#define GL_FALSE
Definition: gl.h:173

Referenced by execute_list(), and init_exec_pointers().

◆ gl_DisableClientState()

void gl_DisableClientState ( GLcontext ctx,
GLenum  cap 
)

Definition at line 648 of file enable.c.

649{
651}
void gl_client_state(GLcontext *ctx, GLenum cap, GLboolean state)
Definition: enable.c:613

Referenced by gl_InterleavedArrays(), init_dlist_pointers(), and init_exec_pointers().

◆ gl_Enable()

void gl_Enable ( GLcontext ctx,
GLenum  cap 
)

Definition at line 462 of file enable.c.

463{
465}
#define GL_TRUE
Definition: gl.h:174

Referenced by execute_list(), and init_exec_pointers().

◆ gl_enable()

static void gl_enable ( GLcontext ctx,
GLenum  cap,
GLboolean  state 
)
static

Definition at line 118 of file enable.c.

119{
120 GLuint p;
121
122 if (INSIDE_BEGIN_END(ctx)) {
123 if (state) {
124 gl_error( ctx, GL_INVALID_OPERATION, "glEnable" );
125 }
126 else {
127 gl_error( ctx, GL_INVALID_OPERATION, "glDisable" );
128 }
129 return;
130 }
131
132 switch (cap) {
133 case GL_ALPHA_TEST:
134 if (ctx->Color.AlphaEnabled!=state) {
135 ctx->Color.AlphaEnabled = state;
136 ctx->NewState |= NEW_RASTER_OPS;
137 }
138 break;
139 case GL_AUTO_NORMAL:
140 ctx->Eval.AutoNormal = state;
141 break;
142 case GL_BLEND:
143 if (ctx->Color.BlendEnabled!=state) {
144 ctx->Color.BlendEnabled = state;
145 /* The following needed to accomodate 1.0 RGB logic op blending */
146 ctx->Color.ColorLogicOpEnabled = GL_FALSE;
147 ctx->NewState |= NEW_RASTER_OPS;
148 }
149 break;
150 case GL_CLIP_PLANE0:
151 case GL_CLIP_PLANE1:
152 case GL_CLIP_PLANE2:
153 case GL_CLIP_PLANE3:
154 case GL_CLIP_PLANE4:
155 case GL_CLIP_PLANE5:
156 ctx->Transform.ClipEnabled[cap-GL_CLIP_PLANE0] = state;
157 /* Check if any clip planes enabled */
158 ctx->Transform.AnyClip = GL_FALSE;
159 for (p=0;p<MAX_CLIP_PLANES;p++) {
160 if (ctx->Transform.ClipEnabled[p]) {
161 ctx->Transform.AnyClip = GL_TRUE;
162 break;
163 }
164 }
165 break;
167 if (ctx->Light.ColorMaterialEnabled!=state) {
168 ctx->Light.ColorMaterialEnabled = state;
169 if (state) {
170 GLfloat color[4];
171 color[0] = ctx->Current.ByteColor[0] * ctx->Visual->InvRedScale;
172 color[1] = ctx->Current.ByteColor[1] * ctx->Visual->InvGreenScale;
173 color[2] = ctx->Current.ByteColor[2] * ctx->Visual->InvBlueScale;
174 color[3] = ctx->Current.ByteColor[3] * ctx->Visual->InvAlphaScale;
175 /* update material with current color */
176 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, color );
177 }
179 ctx->NewState |= NEW_LIGHTING;
180 }
181 break;
182 case GL_CULL_FACE:
183 if (ctx->Polygon.CullFlag!=state) {
184 ctx->Polygon.CullFlag = state;
185 ctx->NewState |= NEW_POLYGON;
186 }
187 break;
188 case GL_DEPTH_TEST:
189 if (state && ctx->Visual->DepthBits==0) {
190 gl_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer");
191 return;
192 }
193 if (ctx->Depth.Test!=state) {
194 ctx->Depth.Test = state;
195 ctx->NewState |= NEW_RASTER_OPS;
196 }
197 break;
198 case GL_DITHER:
199 if (ctx->NoDither) {
200 /* MESA_NO_DITHER env var */
201 state = GL_FALSE;
202 }
203 if (ctx->Color.DitherFlag!=state) {
204 ctx->Color.DitherFlag = state;
205 ctx->NewState |= NEW_RASTER_OPS;
206 }
207 break;
208 case GL_FOG:
209 if (ctx->Fog.Enabled!=state) {
210 ctx->Fog.Enabled = state;
211 ctx->NewState |= NEW_RASTER_OPS;
212 }
213 break;
214 case GL_LIGHT0:
215 case GL_LIGHT1:
216 case GL_LIGHT2:
217 case GL_LIGHT3:
218 case GL_LIGHT4:
219 case GL_LIGHT5:
220 case GL_LIGHT6:
221 case GL_LIGHT7:
222 ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
223 ctx->NewState |= NEW_LIGHTING;
224 break;
225 case GL_LIGHTING:
226 if (ctx->Light.Enabled!=state) {
227 ctx->Light.Enabled = state;
228 ctx->NewState |= NEW_LIGHTING;
229 }
230 break;
231 case GL_LINE_SMOOTH:
232 if (ctx->Line.SmoothFlag!=state) {
233 ctx->Line.SmoothFlag = state;
234 ctx->NewState |= NEW_RASTER_OPS;
235 }
236 break;
237 case GL_LINE_STIPPLE:
238 if (ctx->Line.StippleFlag!=state) {
239 ctx->Line.StippleFlag = state;
240 ctx->NewState |= NEW_RASTER_OPS;
241 }
242 break;
244 if (ctx->Color.IndexLogicOpEnabled!=state) {
245 ctx->NewState |= NEW_RASTER_OPS;
246 }
247 ctx->Color.IndexLogicOpEnabled = state;
248 break;
250 if (ctx->Color.ColorLogicOpEnabled!=state) {
251 ctx->NewState |= NEW_RASTER_OPS;
252 }
253 ctx->Color.ColorLogicOpEnabled = state;
254 break;
255 case GL_MAP1_COLOR_4:
256 ctx->Eval.Map1Color4 = state;
257 break;
258 case GL_MAP1_INDEX:
259 ctx->Eval.Map1Index = state;
260 break;
261 case GL_MAP1_NORMAL:
262 ctx->Eval.Map1Normal = state;
263 break;
265 ctx->Eval.Map1TextureCoord1 = state;
266 break;
268 ctx->Eval.Map1TextureCoord2 = state;
269 break;
271 ctx->Eval.Map1TextureCoord3 = state;
272 break;
274 ctx->Eval.Map1TextureCoord4 = state;
275 break;
276 case GL_MAP1_VERTEX_3:
277 ctx->Eval.Map1Vertex3 = state;
278 break;
279 case GL_MAP1_VERTEX_4:
280 ctx->Eval.Map1Vertex4 = state;
281 break;
282 case GL_MAP2_COLOR_4:
283 ctx->Eval.Map2Color4 = state;
284 break;
285 case GL_MAP2_INDEX:
286 ctx->Eval.Map2Index = state;
287 break;
288 case GL_MAP2_NORMAL:
289 ctx->Eval.Map2Normal = state;
290 break;
292 ctx->Eval.Map2TextureCoord1 = state;
293 break;
295 ctx->Eval.Map2TextureCoord2 = state;
296 break;
298 ctx->Eval.Map2TextureCoord3 = state;
299 break;
301 ctx->Eval.Map2TextureCoord4 = state;
302 break;
303 case GL_MAP2_VERTEX_3:
304 ctx->Eval.Map2Vertex3 = state;
305 break;
306 case GL_MAP2_VERTEX_4:
307 ctx->Eval.Map2Vertex4 = state;
308 break;
309 case GL_NORMALIZE:
310 ctx->Transform.Normalize = state;
311 break;
312 case GL_POINT_SMOOTH:
313 if (ctx->Point.SmoothFlag!=state) {
314 ctx->Point.SmoothFlag = state;
315 ctx->NewState |= NEW_RASTER_OPS;
316 }
317 break;
319 if (ctx->Polygon.SmoothFlag!=state) {
320 ctx->Polygon.SmoothFlag = state;
321 ctx->NewState |= NEW_RASTER_OPS;
322 }
323 break;
325 if (ctx->Polygon.StippleFlag!=state) {
326 ctx->Polygon.StippleFlag = state;
327 ctx->NewState |= NEW_RASTER_OPS;
328 }
329 break;
331 if (ctx->Polygon.OffsetPoint!=state) {
332 ctx->Polygon.OffsetPoint = state;
333 ctx->NewState |= NEW_POLYGON;
334 }
335 break;
337 if (ctx->Polygon.OffsetLine!=state) {
338 ctx->Polygon.OffsetLine = state;
339 ctx->NewState |= NEW_POLYGON;
340 }
341 break;
343 /*case GL_POLYGON_OFFSET_EXT:*/
344 if (ctx->Polygon.OffsetFill!=state) {
345 ctx->Polygon.OffsetFill = state;
346 ctx->NewState |= NEW_POLYGON;
347 }
348 break;
349 case GL_SCISSOR_TEST:
350 if (ctx->Scissor.Enabled!=state) {
351 ctx->Scissor.Enabled = state;
352 ctx->NewState |= NEW_RASTER_OPS;
353 }
354 break;
355 case GL_STENCIL_TEST:
356 if (state && ctx->Visual->StencilBits==0) {
357 gl_warning(ctx, "glEnable(GL_STENCIL_TEST) but no stencil buffer");
358 return;
359 }
360 if (ctx->Stencil.Enabled!=state) {
361 ctx->Stencil.Enabled = state;
362 ctx->NewState |= NEW_RASTER_OPS;
363 }
364 break;
365 case GL_TEXTURE_1D:
366 if (ctx->Visual->RGBAflag) {
367 /* texturing only works in RGB mode */
368 if (state) {
369 ctx->Texture.Enabled |= TEXTURE_1D;
370 }
371 else {
372 ctx->Texture.Enabled &= (~TEXTURE_1D);
373 }
374 ctx->NewState |= (NEW_RASTER_OPS | NEW_TEXTURING);
375 }
376 break;
377 case GL_TEXTURE_2D:
378 if (ctx->Visual->RGBAflag) {
379 /* texturing only works in RGB mode */
380 if (state) {
381 ctx->Texture.Enabled |= TEXTURE_2D;
382 }
383 else {
384 ctx->Texture.Enabled &= (~TEXTURE_2D);
385 }
386 ctx->NewState |= (NEW_RASTER_OPS | NEW_TEXTURING);
387 }
388 break;
389 case GL_TEXTURE_GEN_Q:
390 if (state) {
391 ctx->Texture.TexGenEnabled |= Q_BIT;
392 }
393 else {
394 ctx->Texture.TexGenEnabled &= ~Q_BIT;
395 }
396 ctx->NewState |= NEW_TEXTURING;
397 break;
398 case GL_TEXTURE_GEN_R:
399 if (state) {
400 ctx->Texture.TexGenEnabled |= R_BIT;
401 }
402 else {
403 ctx->Texture.TexGenEnabled &= ~R_BIT;
404 }
405 ctx->NewState |= NEW_TEXTURING;
406 break;
407 case GL_TEXTURE_GEN_S:
408 if (state) {
409 ctx->Texture.TexGenEnabled |= S_BIT;
410 }
411 else {
412 ctx->Texture.TexGenEnabled &= ~S_BIT;
413 }
414 ctx->NewState |= NEW_TEXTURING;
415 break;
416 case GL_TEXTURE_GEN_T:
417 if (state) {
418 ctx->Texture.TexGenEnabled |= T_BIT;
419 }
420 else {
421 ctx->Texture.TexGenEnabled &= ~T_BIT;
422 }
423 ctx->NewState |= NEW_TEXTURING;
424 break;
425
426 /*
427 * CLIENT STATE!!!
428 */
429 case GL_VERTEX_ARRAY:
430 ctx->Array.VertexEnabled = state;
431 break;
432 case GL_NORMAL_ARRAY:
433 ctx->Array.NormalEnabled = state;
434 break;
435 case GL_COLOR_ARRAY:
436 ctx->Array.ColorEnabled = state;
437 break;
438 case GL_INDEX_ARRAY:
439 ctx->Array.IndexEnabled = state;
440 break;
442 ctx->Array.TexCoordEnabled = state;
443 break;
445 ctx->Array.EdgeFlagEnabled = state;
446 break;
447
448 default:
449 if (state) {
450 gl_error( ctx, GL_INVALID_ENUM, "glEnable" );
451 }
452 else {
453 gl_error( ctx, GL_INVALID_ENUM, "glDisable" );
454 }
455 break;
456 }
457}
#define MAX_CLIP_PLANES
Definition: config.h:87
void gl_warning(const GLcontext *ctx, const char *s)
Definition: context.c:1406
#define S_BIT
Definition: types.h:891
#define R_BIT
Definition: types.h:890
#define TEXTURE_1D
Definition: types.h:894
#define NEW_LIGHTING
Definition: types.h:1232
#define Q_BIT
Definition: types.h:889
#define NEW_TEXTURING
Definition: types.h:1234
#define NEW_RASTER_OPS
Definition: types.h:1233
#define T_BIT
Definition: types.h:892
#define TEXTURE_2D
Definition: types.h:895
#define NEW_POLYGON
Definition: types.h:1235
#define GL_CLIP_PLANE0
Definition: gl.h:346
#define GL_POLYGON_STIPPLE
Definition: gl.h:274
#define GL_LIGHT3
Definition: gl.h:314
#define GL_AUTO_NORMAL
Definition: gl.h:550
#define GL_TEXTURE_GEN_Q
Definition: gl.h:654
#define GL_POLYGON_OFFSET_LINE
Definition: gl.h:282
#define GL_MAP2_NORMAL
Definition: gl.h:562
#define GL_MAP1_TEXTURE_COORD_3
Definition: gl.h:556
#define GL_MAP2_INDEX
Definition: gl.h:561
#define GL_MAP2_TEXTURE_COORD_2
Definition: gl.h:564
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
float GLfloat
Definition: gl.h:161
#define GL_LIGHT1
Definition: gl.h:312
#define GL_POLYGON_OFFSET_FILL
Definition: gl.h:283
#define GL_COLOR_LOGIC_OP
Definition: gl.h:428
#define GL_LIGHT4
Definition: gl.h:315
#define GL_POLYGON_SMOOTH
Definition: gl.h:273
#define GL_MAP1_TEXTURE_COORD_2
Definition: gl.h:555
#define GL_MAP2_TEXTURE_COORD_4
Definition: gl.h:566
#define GL_DEPTH_TEST
Definition: gl.h:301
#define GL_CLIP_PLANE2
Definition: gl.h:348
#define GL_STENCIL_TEST
Definition: gl.h:449
#define GL_ALPHA_TEST
Definition: gl.h:366
#define GL_CLIP_PLANE1
Definition: gl.h:347
#define GL_NORMALIZE
Definition: gl.h:343
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define GL_TEXTURE_GEN_T
Definition: gl.h:652
#define GL_LINE_STIPPLE
Definition: gl.h:257
#define GL_POINT_SMOOTH
Definition: gl.h:250
#define GL_CLIP_PLANE3
Definition: gl.h:349
#define GL_LIGHT2
Definition: gl.h:313
#define GL_LIGHT5
Definition: gl.h:316
unsigned int GLuint
Definition: gl.h:159
#define GL_TEXTURE_GEN_R
Definition: gl.h:653
#define GL_DITHER
Definition: gl.h:501
#define GL_INDEX_LOGIC_OP
Definition: gl.h:427
#define GL_MAP2_COLOR_4
Definition: gl.h:560
#define GL_CULL_FACE
Definition: gl.h:276
#define GL_FOG
Definition: gl.h:414
#define GL_MAP1_TEXTURE_COORD_1
Definition: gl.h:554
#define GL_COLOR_MATERIAL
Definition: gl.h:340
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define GL_MAP1_INDEX
Definition: gl.h:552
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
#define GL_BLEND
Definition: gl.h:371
#define GL_MAP1_TEXTURE_COORD_4
Definition: gl.h:557
#define GL_MAP1_COLOR_4
Definition: gl.h:551
#define GL_POLYGON_OFFSET_POINT
Definition: gl.h:281
#define GL_CLIP_PLANE5
Definition: gl.h:351
#define GL_LIGHT6
Definition: gl.h:317
#define GL_SCISSOR_TEST
Definition: gl.h:589
#define GL_MAP2_TEXTURE_COORD_1
Definition: gl.h:563
#define GL_MAP2_TEXTURE_COORD_3
Definition: gl.h:565
#define GL_MAP1_NORMAL
Definition: gl.h:553
#define GL_TEXTURE_2D
Definition: gl.h:645
#define GL_LIGHT7
Definition: gl.h:318
#define GL_TEXTURE_1D
Definition: gl.h:644
#define GL_TEXTURE_GEN_S
Definition: gl.h:651
#define GL_LINE_SMOOTH
Definition: gl.h:256
#define GL_CLIP_PLANE4
Definition: gl.h:350
#define GL_LIGHT0
Definition: gl.h:311
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define GL_LIGHTING
Definition: gl.h:310
GLuint color
Definition: glext.h:6243
GLfloat GLfloat p
Definition: glext.h:8902
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
void gl_set_material(GLcontext *ctx, GLuint bitmask, const GLfloat *params)
Definition: light.c:413
void gl_set_color_function(GLcontext *ctx)
Definition: vbfill.c:1236

Referenced by gl_Disable(), and gl_Enable().

◆ gl_EnableClientState()

void gl_EnableClientState ( GLcontext ctx,
GLenum  cap 
)

Definition at line 641 of file enable.c.

642{
644}

Referenced by gl_InterleavedArrays(), init_dlist_pointers(), and init_exec_pointers().

◆ gl_IsEnabled()

GLboolean gl_IsEnabled ( GLcontext ctx,
GLenum  cap 
)

Definition at line 476 of file enable.c.

477{
478 switch (cap) {
479 case GL_ALPHA_TEST:
480 return ctx->Color.AlphaEnabled;
481 case GL_AUTO_NORMAL:
482 return ctx->Eval.AutoNormal;
483 case GL_BLEND:
484 return ctx->Color.BlendEnabled;
485 case GL_CLIP_PLANE0:
486 case GL_CLIP_PLANE1:
487 case GL_CLIP_PLANE2:
488 case GL_CLIP_PLANE3:
489 case GL_CLIP_PLANE4:
490 case GL_CLIP_PLANE5:
491 return ctx->Transform.ClipEnabled[cap-GL_CLIP_PLANE0];
493 return ctx->Light.ColorMaterialEnabled;
494 case GL_CULL_FACE:
495 return ctx->Polygon.CullFlag;
496 case GL_DEPTH_TEST:
497 return ctx->Depth.Test;
498 case GL_DITHER:
499 return ctx->Color.DitherFlag;
500 case GL_FOG:
501 return ctx->Fog.Enabled;
502 case GL_LIGHTING:
503 return ctx->Light.Enabled;
504 case GL_LIGHT0:
505 case GL_LIGHT1:
506 case GL_LIGHT2:
507 case GL_LIGHT3:
508 case GL_LIGHT4:
509 case GL_LIGHT5:
510 case GL_LIGHT6:
511 case GL_LIGHT7:
512 return ctx->Light.Light[cap-GL_LIGHT0].Enabled;
513 case GL_LINE_SMOOTH:
514 return ctx->Line.SmoothFlag;
515 case GL_LINE_STIPPLE:
516 return ctx->Line.StippleFlag;
518 return ctx->Color.IndexLogicOpEnabled;
520 return ctx->Color.ColorLogicOpEnabled;
521 case GL_MAP1_COLOR_4:
522 return ctx->Eval.Map1Color4;
523 case GL_MAP1_INDEX:
524 return ctx->Eval.Map1Index;
525 case GL_MAP1_NORMAL:
526 return ctx->Eval.Map1Normal;
528 return ctx->Eval.Map1TextureCoord1;
530 return ctx->Eval.Map1TextureCoord2;
532 return ctx->Eval.Map1TextureCoord3;
534 return ctx->Eval.Map1TextureCoord4;
535 case GL_MAP1_VERTEX_3:
536 return ctx->Eval.Map1Vertex3;
537 case GL_MAP1_VERTEX_4:
538 return ctx->Eval.Map1Vertex4;
539 case GL_MAP2_COLOR_4:
540 return ctx->Eval.Map2Color4;
541 case GL_MAP2_INDEX:
542 return ctx->Eval.Map2Index;
543 case GL_MAP2_NORMAL:
544 return ctx->Eval.Map2Normal;
546 return ctx->Eval.Map2TextureCoord1;
548 return ctx->Eval.Map2TextureCoord2;
550 return ctx->Eval.Map2TextureCoord3;
552 return ctx->Eval.Map2TextureCoord4;
553 case GL_MAP2_VERTEX_3:
554 return ctx->Eval.Map2Vertex3;
555 case GL_MAP2_VERTEX_4:
556 return ctx->Eval.Map2Vertex4;
557 case GL_NORMALIZE:
558 return ctx->Transform.Normalize;
559 case GL_POINT_SMOOTH:
560 return ctx->Point.SmoothFlag;
562 return ctx->Polygon.SmoothFlag;
564 return ctx->Polygon.StippleFlag;
566 return ctx->Polygon.OffsetPoint;
568 return ctx->Polygon.OffsetLine;
570 /*case GL_POLYGON_OFFSET_EXT:*/
571 return ctx->Polygon.OffsetFill;
572 case GL_SCISSOR_TEST:
573 return ctx->Scissor.Enabled;
574 case GL_STENCIL_TEST:
575 return ctx->Stencil.Enabled;
576 case GL_TEXTURE_1D:
577 return (ctx->Texture.Enabled & TEXTURE_1D) ? GL_TRUE : GL_FALSE;
578 case GL_TEXTURE_2D:
579 return (ctx->Texture.Enabled & TEXTURE_2D) ? GL_TRUE : GL_FALSE;
580 case GL_TEXTURE_GEN_Q:
581 return (ctx->Texture.TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE;
582 case GL_TEXTURE_GEN_R:
583 return (ctx->Texture.TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE;
584 case GL_TEXTURE_GEN_S:
585 return (ctx->Texture.TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE;
586 case GL_TEXTURE_GEN_T:
587 return (ctx->Texture.TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE;
588
589 /*
590 * CLIENT STATE!!!
591 */
592 case GL_VERTEX_ARRAY:
593 return ctx->Array.VertexEnabled;
594 case GL_NORMAL_ARRAY:
595 return ctx->Array.NormalEnabled;
596 case GL_COLOR_ARRAY:
597 return ctx->Array.ColorEnabled;
598 case GL_INDEX_ARRAY:
599 return ctx->Array.IndexEnabled;
601 return ctx->Array.TexCoordEnabled;
603 return ctx->Array.EdgeFlagEnabled;
604 default:
605 gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
606 return GL_FALSE;
607 }
608}

Referenced by init_dlist_pointers(), and init_exec_pointers().