Home | History | Annotate | Download | only in main

Lines Matching full:texunit

124    const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
126 printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode));
127 printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB));
128 printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA));
129 printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0]));
130 printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1]));
131 printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2]));
132 printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0]));
133 printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1]));
134 printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2]));
135 printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0]));
136 printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1]));
137 printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2]));
138 printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0]));
139 printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1]));
140 printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2]));
141 printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB);
142 printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA);
143 printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]);
291 const GLuint texUnit = texture - GL_TEXTURE0;
307 if (texUnit >= k) {
313 if (ctx->Texture.CurrentUnit == texUnit)
318 ctx->Texture.CurrentUnit = texUnit;
321 ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit];
331 GLuint texUnit = texture - GL_TEXTURE0;
338 if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
343 if (ctx->Array.ActiveTexture == texUnit)
347 ctx->Array.ActiveTexture = texUnit;
389 update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit)
394 if (texUnit->_Current->Target == GL_TEXTURE_BUFFER)
397 /* Set the texUnit->_CurrentCombine field to point to the user's combiner
401 if (texUnit->EnvMode == GL_COMBINE ||
402 texUnit->EnvMode == GL_COMBINE4_NV) {
403 texUnit->_CurrentCombine = & texUnit->Combine;
406 const struct gl_texture_object *texObj = texUnit->_Current;
412 calculate_derived_texenv(&texUnit->_EnvMode, texUnit->EnvMode, format);
413 texUnit->_CurrentCombine = & texUnit->_EnvMode;
416 combine = texUnit->_CurrentCombine;
425 if (texUnit->EnvMode == GL_COMBINE4_NV)
461 if (texUnit->EnvMode == GL_COMBINE4_NV)
534 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
555 enabledFragTargets |= texUnit->Enabled;
560 texUnit->_ReallyEnabled = 0x0;
575 struct gl_texture_object *texObj = texUnit->CurrentTex[texIndex];
576 struct gl_sampler_object *sampler = texUnit->Sampler ?
577 texUnit->Sampler : &texObj->Sampler;
583 texUnit->_ReallyEnabled = 1 << texIndex;
584 _mesa_reference_texobj(&texUnit->_Current, texObj);
590 if (!texUnit->_ReallyEnabled) {
610 _mesa_reference_texobj(&texUnit->_Current, texObj);
611 texUnit->_ReallyEnabled = 1 << texTarget;
626 update_tex_combine(ctx, texUnit);
642 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
644 texUnit->_GenFlags = 0x0;
649 if (texUnit->TexGenEnabled) {
650 if (texUnit->TexGenEnabled & S_BIT) {
651 texUnit->_GenFlags |= texUnit->GenS._ModeBit;
653 if (texUnit->TexGenEnabled & T_BIT) {
654 texUnit->_GenFlags |= texUnit->GenT._ModeBit;
656 if (texUnit->TexGenEnabled & R_BIT) {
657 texUnit->_GenFlags |= texUnit->GenR._ModeBit;
659 if (texUnit->TexGenEnabled & Q_BIT) {
660 texUnit->_GenFlags |= texUnit->GenQ._ModeBit;
664 ctx->Texture._GenFlags |= texUnit->_GenFlags;
750 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
753 texUnit->EnvMode = GL_MODULATE;
754 ASSIGN_4V( texUnit->EnvColor, 0.0, 0.0, 0.0, 0.0 );
756 texUnit->Combine = default_combine_state;
757 texUnit->_EnvMode = default_combine_state;
758 texUnit->_CurrentCombine = & texUnit->_EnvMode;
759 texUnit->BumpTarget = GL_TEXTURE0;
761 texUnit->TexGenEnabled = 0x0;
762 texUnit->GenS.Mode = GL_EYE_LINEAR;
763 texUnit->GenT.Mode = GL_EYE_LINEAR;
764 texUnit->GenR.Mode = GL_EYE_LINEAR;
765 texUnit->GenQ.Mode = GL_EYE_LINEAR;
766 texUnit->GenS._ModeBit = TEXGEN_EYE_LINEAR;
767 texUnit->GenT._ModeBit = TEXGEN_EYE_LINEAR;
768 texUnit->GenR._ModeBit = TEXGEN_EYE_LINEAR;
769 texUnit->GenQ._ModeBit = TEXGEN_EYE_LINEAR;
772 ASSIGN_4V( texUnit->GenS.ObjectPlane, 1.0, 0.0, 0.0, 0.0 );
773 ASSIGN_4V( texUnit->GenT.ObjectPlane, 0.0, 1.0, 0.0, 0.0 );
774 ASSIGN_4V( texUnit->GenR.ObjectPlane, 0.0, 0.0, 0.0, 0.0 );
775 ASSIGN_4V( texUnit->GenQ.ObjectPlane, 0.0, 0.0, 0.0, 0.0 );
776 ASSIGN_4V( texUnit->GenS.EyePlane, 1.0, 0.0, 0.0, 0.0 );
777 ASSIGN_4V( texUnit->GenT.EyePlane, 0.0, 1.0, 0.0, 0.0 );
778 ASSIGN_4V( texUnit->GenR.EyePlane, 0.0, 0.0, 0.0, 0.0 );
779 ASSIGN_4V( texUnit->GenQ.EyePlane, 0.0, 0.0, 0.0, 0.0 );
782 ASSIGN_4V( texUnit->RotMatrix, 1.0, 0.0, 0.0, 1.0 );
786 _mesa_reference_texobj(&texUnit->CurrentTex[tex],
870 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u];
872 _mesa_reference_texobj(&texUnit->CurrentTex[tex],