Lines Matching defs:texUnit
132 const struct gl_fixedfunc_texture_unit *texUnit = ctx->Texture.FixedFuncUnit + unit;
134 printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_enum_to_string(texUnit->EnvMode));
135 printf(" GL_COMBINE_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.ModeRGB));
136 printf(" GL_COMBINE_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.ModeA));
137 printf(" GL_SOURCE0_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.SourceRGB[0]));
138 printf(" GL_SOURCE1_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.SourceRGB[1]));
139 printf(" GL_SOURCE2_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.SourceRGB[2]));
140 printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.SourceA[0]));
141 printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.SourceA[1]));
142 printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.SourceA[2]));
143 printf(" GL_OPERAND0_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.OperandRGB[0]));
144 printf(" GL_OPERAND1_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.OperandRGB[1]));
145 printf(" GL_OPERAND2_RGB = %s\n", _mesa_enum_to_string(texUnit->Combine.OperandRGB[2]));
146 printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.OperandA[0]));
147 printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.OperandA[1]));
148 printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_enum_to_string(texUnit->Combine.OperandA[2]));
149 printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB);
150 printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA);
151 printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]);
294 const GLuint texUnit = texture - GL_TEXTURE0;
302 if (ctx->Texture.CurrentUnit == texUnit)
310 if (texUnit >= k) {
330 ctx->Texture.CurrentUnit = texUnit;
333 ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit];
357 GLuint texUnit = texture - GL_TEXTURE0;
363 if (ctx->Array.ActiveTexture == texUnit)
366 if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
373 ctx->Array.ActiveTexture = texUnit;
490 pack_tex_combine(struct gl_fixedfunc_texture_unit *texUnit)
492 struct gl_tex_env_combine_state *state = texUnit->_CurrentCombine;
493 struct gl_tex_env_combine_packed *packed = &texUnit->_CurrentCombinePacked;
497 packed->ModeRGB = tex_combine_translate_mode(texUnit->EnvMode, state->ModeRGB);
498 packed->ModeA = tex_combine_translate_mode(texUnit->EnvMode, state->ModeA);
523 struct gl_texture_unit *texUnit,
529 if (texUnit->_Current->Target == GL_TEXTURE_BUFFER)
532 /* Set the texUnit->_CurrentCombine field to point to the user's combiner
541 const struct gl_texture_object *texObj = texUnit->_Current;
623 struct gl_fixedfunc_texture_unit *texUnit =
626 texUnit->_GenFlags = 0x0;
631 if (texUnit->TexGenEnabled) {
632 if (texUnit->TexGenEnabled & S_BIT) {
633 texUnit->_GenFlags |= texUnit->GenS._ModeBit;
635 if (texUnit->TexGenEnabled & T_BIT) {
636 texUnit->_GenFlags |= texUnit->GenT._ModeBit;
638 if (texUnit->TexGenEnabled & R_BIT) {
639 texUnit->_GenFlags |= texUnit->GenR._ModeBit;
641 if (texUnit->TexGenEnabled & Q_BIT) {
642 texUnit->_GenFlags |= texUnit->GenQ._ModeBit;
646 ctx->Texture._GenFlags |= texUnit->_GenFlags;
660 struct gl_texture_unit *texUnit;
664 texUnit = &ctx->Texture.Unit[unit];
677 texObj = texUnit->CurrentTex[target_index];
679 sampler = texUnit->Sampler ?
680 texUnit->Sampler : &texObj->Sampler;
781 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
827 struct gl_texture_object *texObj = texUnit->CurrentTex[texIndex];
828 struct gl_sampler_object *sampler = texUnit->Sampler ?
829 texUnit->Sampler : &texObj->Sampler;
837 _mesa_reference_texobj(&texUnit->_Current, texObj);
853 update_tex_combine(ctx, texUnit, fftexUnit);
1051 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u];
1056 _mesa_reference_texobj(&texUnit->CurrentTex[tex],
1060 texUnit->_BoundTextures = 0;
1064 struct gl_fixedfunc_texture_unit *texUnit =
1067 texUnit->EnvMode = GL_MODULATE;
1068 ASSIGN_4V( texUnit->EnvColor, 0.0, 0.0, 0.0, 0.0 );
1070 texUnit->Combine = default_combine_state;
1071 texUnit->_EnvMode = default_combine_state;
1072 texUnit->_CurrentCombine = & texUnit->_EnvMode;
1074 texUnit->TexGenEnabled = 0x0;
1075 texUnit->GenS.Mode = GL_EYE_LINEAR;
1076 texUnit->GenT.Mode = GL_EYE_LINEAR;
1077 texUnit->GenR.Mode = GL_EYE_LINEAR;
1078 texUnit->GenQ.Mode = GL_EYE_LINEAR;
1079 texUnit->GenS._ModeBit = TEXGEN_EYE_LINEAR;
1080 texUnit->GenT._ModeBit = TEXGEN_EYE_LINEAR;
1081 texUnit->GenR._ModeBit = TEXGEN_EYE_LINEAR;
1082 texUnit->GenQ._ModeBit = TEXGEN_EYE_LINEAR;
1085 ASSIGN_4V( texUnit->ObjectPlane[GEN_S], 1.0, 0.0, 0.0, 0.0 );
1086 ASSIGN_4V( texUnit->ObjectPlane[GEN_T], 0.0, 1.0, 0.0, 0.0 );
1087 ASSIGN_4V( texUnit->ObjectPlane[GEN_R], 0.0, 0.0, 0.0, 0.0 );
1088 ASSIGN_4V( texUnit->ObjectPlane[GEN_Q], 0.0, 0.0, 0.0, 0.0 );
1089 ASSIGN_4V( texUnit->EyePlane[GEN_S], 1.0, 0.0, 0.0, 0.0 );
1090 ASSIGN_4V( texUnit->EyePlane[GEN_T], 0.0, 1.0, 0.0, 0.0 );
1091 ASSIGN_4V( texUnit->EyePlane[GEN_R], 0.0, 0.0, 0.0, 0.0 );
1092 ASSIGN_4V( texUnit->EyePlane[GEN_Q], 0.0, 0.0, 0.0, 0.0 );
1157 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u];
1159 _mesa_reference_texobj(&texUnit->CurrentTex[tex],