ReactOS 0.4.16-dev-329-g9223134
enable.h File Reference
#include "types.h"
Include dependency graph for enable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void gl_Disable (GLcontext *ctx, GLenum cap)
 
void gl_Enable (GLcontext *ctx, GLenum cap)
 
GLboolean gl_IsEnabled (GLcontext *ctx, GLenum cap)
 
void gl_EnableClientState (GLcontext *ctx, GLenum cap)
 
void gl_DisableClientState (GLcontext *ctx, GLenum cap)
 

Function Documentation

◆ 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
GLenum cap
Definition: glext.h:9639

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_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}
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
#define S_BIT
Definition: types.h:891
#define R_BIT
Definition: types.h:890
#define TEXTURE_1D
Definition: types.h:894
#define Q_BIT
Definition: types.h:889
#define T_BIT
Definition: types.h:892
#define TEXTURE_2D
Definition: types.h:895
#define GL_TEXTURE_COORD_ARRAY
Definition: gl.h:206
#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_COLOR_ARRAY
Definition: gl.h:204
#define GL_MAP2_TEXTURE_COORD_2
Definition: gl.h:564
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
#define GL_LIGHT1
Definition: gl.h:312
#define GL_NORMAL_ARRAY
Definition: gl.h:203
#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_INDEX_ARRAY
Definition: gl.h:205
#define GL_CLIP_PLANE1
Definition: gl.h:347
#define GL_NORMALIZE
Definition: gl.h:343
#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
#define GL_TEXTURE_GEN_R
Definition: gl.h:653
#define GL_VERTEX_ARRAY
Definition: gl.h:202
#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_EDGE_FLAG_ARRAY
Definition: gl.h:207
#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_INVALID_ENUM
Definition: gl.h:694
#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

Referenced by init_dlist_pointers(), and init_exec_pointers().