Lines Matching refs:state
52 * Helper to enable/disable client-side state.
55 client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
142 if (*var == state)
149 *var = state;
151 if (state)
159 ctx->Driver.Enable( ctx, cap, state );
166 state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap));
172 * \param cap state to enable/disable.
188 * \param cap state to enable/disable.
215 * state.
235 * \return GL_TRUE if state is changing or GL_FALSE if no change
238 enable_texture(struct gl_context *ctx, GLboolean state, GLbitfield texBit)
241 const GLbitfield newenabled = state
254 * Helper function to enable or disable state.
257 * \param cap the state to enable/disable
258 * \param state whether to enable or disable the specified capability.
266 _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
270 state ? "glEnable" : "glDisable",
278 if (ctx->Color.AlphaEnabled == state)
281 ctx->Color.AlphaEnabled = state;
286 if (ctx->Eval.AutoNormal == state)
289 ctx->Eval.AutoNormal = state;
294 state * ((1 << ctx->Const.MaxDrawBuffers) - 1);
317 == ((GLuint) state << p))
322 if (state) {
335 if (ctx->Light.ColorMaterialEnabled == state)
339 ctx->Light.ColorMaterialEnabled = state;
340 if (state) {
346 if (ctx->Polygon.CullFlag == state)
349 ctx->Polygon.CullFlag = state;
352 if (ctx->Depth.Test == state)
355 ctx->Depth.Test = state;
360 ctx->Debug.SyncOutput = state;
363 if (ctx->Color.DitherFlag == state)
366 ctx->Color.DitherFlag = state;
371 if (ctx->Fog.Enabled == state)
374 ctx->Fog.Enabled = state;
386 if (ctx->Light.Light[cap-GL_LIGHT0].Enabled == state)
389 ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
390 if (state) {
401 if (ctx->Light.Enabled == state)
404 ctx->Light.Enabled = state;
413 if (ctx->Line.SmoothFlag == state)
416 ctx->Line.SmoothFlag = state;
422 if (ctx->Line.StippleFlag == state)
425 ctx->Line.StippleFlag = state;
431 if (ctx->Color.IndexLogicOpEnabled == state)
434 ctx->Color.IndexLogicOpEnabled = state;
439 if (ctx->Color.ColorLogicOpEnabled == state)
442 ctx->Color.ColorLogicOpEnabled = state;
447 if (ctx->Eval.Map1Color4 == state)
450 ctx->Eval.Map1Color4 = state;
455 if (ctx->Eval.Map1Index == state)
458 ctx->Eval.Map1Index = state;
463 if (ctx->Eval.Map1Normal == state)
466 ctx->Eval.Map1Normal = state;
471 if (ctx->Eval.Map1TextureCoord1 == state)
474 ctx->Eval.Map1TextureCoord1 = state;
479 if (ctx->Eval.Map1TextureCoord2 == state)
482 ctx->Eval.Map1TextureCoord2 = state;
487 if (ctx->Eval.Map1TextureCoord3 == state)
490 ctx->Eval.Map1TextureCoord3 = state;
495 if (ctx->Eval.Map1TextureCoord4 == state)
498 ctx->Eval.Map1TextureCoord4 = state;
503 if (ctx->Eval.Map1Vertex3 == state)
506 ctx->Eval.Map1Vertex3 = state;
511 if (ctx->Eval.Map1Vertex4 == state)
514 ctx->Eval.Map1Vertex4 = state;
519 state)
522 ctx->Eval.Map2Color4 = state;
527 if (ctx->Eval.Map2Index == state)
530 ctx->Eval.Map2Index = state;
535 if (ctx->Eval.Map2Normal == state)
538 ctx->Eval.Map2Normal = state;
543 if (ctx->Eval.Map2TextureCoord1 == state)
546 ctx->Eval.Map2TextureCoord1 = state;
551 if (ctx->Eval.Map2TextureCoord2 == state)
554 ctx->Eval.Map2TextureCoord2 = state;
559 if (ctx->Eval.Map2TextureCoord3 == state)
562 ctx->Eval.Map2TextureCoord3 = state;
567 if (ctx->Eval.Map2TextureCoord4 == state)
570 ctx->Eval.Map2TextureCoord4 = state;
575 if (ctx->Eval.Map2Vertex3 == state)
578 ctx->Eval.Map2Vertex3 = state;
583 if (ctx->Eval.Map2Vertex4 == state)
586 ctx->Eval.Map2Vertex4 = state;
591 if (ctx->Transform.Normalize == state)
594 ctx->Transform.Normalize = state;
599 if (ctx->Point.SmoothFlag == state)
602 ctx->Point.SmoothFlag = state;
608 if (ctx->Polygon.SmoothFlag == state)
611 ctx->Polygon.SmoothFlag = state;
617 if (ctx->Polygon.StippleFlag == state)
620 ctx->Polygon.StippleFlag = state;
626 if (ctx->Polygon.OffsetPoint == state)
629 ctx->Polygon.OffsetPoint = state;
634 if (ctx->Polygon.OffsetLine == state)
637 ctx->Polygon.OffsetLine = state;
640 if (ctx->Polygon.OffsetFill == state)
643 ctx->Polygon.OffsetFill = state;
648 if (ctx->Transform.RescaleNormals == state)
651 ctx->Transform.RescaleNormals = state;
654 if (ctx->Scissor.Enabled == state)
657 ctx->Scissor.Enabled = state;
660 if (ctx->Stencil.Enabled == state)
663 ctx->Stencil.Enabled = state;
668 if (!enable_texture(ctx, state, TEXTURE_1D_BIT)) {
675 if (!enable_texture(ctx, state, TEXTURE_2D_BIT)) {
682 if (!enable_texture(ctx, state, TEXTURE_3D_BIT)) {
699 if (state)
721 if (state)
732 /* client-side state */
742 client_state( ctx, cap, state );
750 if (!enable_texture(ctx, state, TEXTURE_CUBE_BIT)) {
760 if (ctx->Fog.ColorSumEnabled == state)
763 ctx->Fog.ColorSumEnabled = state;
770 if (ctx->Multisample.Enabled == state)
773 ctx->Multisample.Enabled = state;
776 if (ctx->Multisample.SampleAlphaToCoverage == state)
779 ctx->Multisample.SampleAlphaToCoverage = state;
784 if (ctx->Multisample.SampleAlphaToOne == state)
787 ctx->Multisample.SampleAlphaToOne = state;
790 if (ctx->Multisample.SampleCoverage == state)
793 ctx->Multisample.SampleCoverage = state;
798 if (ctx->Multisample.SampleCoverageInvert == state)
801 ctx->Multisample.SampleCoverageInvert = state;
809 if (ctx->Transform.RasterPositionUnclipped == state)
812 ctx->Transform.RasterPositionUnclipped = state;
820 if (ctx->Point.PointSprite == state)
823 ctx->Point.PointSprite = state;
831 if (ctx->VertexProgram.Enabled == state)
834 ctx->VertexProgram.Enabled = state;
843 if (ctx->VertexProgram.PointSizeEnabled == state)
846 ctx->VertexProgram.PointSizeEnabled = state;
852 if (ctx->VertexProgram.TwoSideEnabled == state)
855 ctx->VertexProgram.TwoSideEnabled = state;
881 ctx->Eval.Map1Attrib[map] = state;
906 ctx->Eval.Map2Attrib[map] = state;
916 if (ctx->FragmentProgram.Enabled == state)
919 ctx->FragmentProgram.Enabled = state;
928 if (!enable_texture(ctx, state, TEXTURE_RECT_BIT)) {
938 if (ctx->Stencil.TestTwoSide == state)
941 ctx->Stencil.TestTwoSide = state;
942 if (state) {
954 if (ctx->FragmentProgram.Enabled == state)
957 ctx->FragmentProgram.Enabled = state;
966 if (ctx->Depth.BoundsTest == state)
969 ctx->Depth.BoundsTest = state;
976 if (ctx->Transform.DepthClamp == state)
979 ctx->Transform.DepthClamp = state;
987 if (ctx->ATIFragmentShader.Enabled == state)
990 ctx->ATIFragmentShader.Enabled = state;
999 if (!enable_texture(ctx, state, TEXTURE_1D_ARRAY_BIT)) {
1008 if (!enable_texture(ctx, state, TEXTURE_2D_ARRAY_BIT)) {
1017 if (ctx->Texture.CubeMapSeamless != state) {
1019 ctx->Texture.CubeMapSeamless = state;
1028 if (ctx->RasterDiscard != state) {
1030 ctx->RasterDiscard = state;
1036 * GL_PRIMITIVE_RESTART_NV (which is client state).
1042 if (ctx->Array.PrimitiveRestart != state) {
1044 ctx->Array.PrimitiveRestart = state;
1054 ctx->Color.sRGBEnabled = state;
1062 if (!enable_texture(ctx, state, TEXTURE_EXTERNAL_BIT)) {
1072 ctx->Driver.Enable( ctx, cap, state );
1079 state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap));
1085 * \param cap state to enable.
1099 * \param cap state to disable.
1113 * Enable/disable an indexed state var.
1117 GLuint index, GLboolean state)
1119 ASSERT(state == 0 || state == 1);
1127 state ? "glEnableIndexed" : "glDisableIndexed", index);
1130 if (((ctx->Color.BlendEnabled >> index) & 1) != state) {
1132 if (state)
1145 state ? "glEnablei" : "glDisablei",
1217 * Return simple enable/disable state.
1219 * \param cap state variable to query.
1221 * Returns the state of the specified capability from the current GL context.
1241 return ctx->Color.BlendEnabled & 1; /* return state for buffer[0] */
1455 /* client-side state */