diff options
-rw-r--r-- | src/mesa/main/texstate.c | 34 | ||||
-rw-r--r-- | src/mesa/main/texstate.h | 7 |
2 files changed, 37 insertions, 4 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 2a6abedf823..41c41c21e40 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,8 +1,8 @@ -/* $Id: texstate.c,v 1.87 2002/11/05 20:58:37 brianp Exp $ */ +/* $Id: texstate.c,v 1.88 2002/12/05 04:51:57 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 5.0 + * Version: 5.1 * * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * @@ -116,6 +116,36 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) } +/* + * For debugging + */ +void +_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ) +{ + const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit; + _mesa_printf("Texture Unit %d\n", unit); + _mesa_printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode)); + _mesa_printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineModeRGB)); + _mesa_printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineModeA)); + _mesa_printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[0])); + _mesa_printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[1])); + _mesa_printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[2])); + _mesa_printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[0])); + _mesa_printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[1])); + _mesa_printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[2])); + _mesa_printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[0])); + _mesa_printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[1])); + _mesa_printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[2])); + _mesa_printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[0])); + _mesa_printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[1])); + _mesa_printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[2])); + _mesa_printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->CombineScaleShiftRGB); + _mesa_printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->CombineScaleShiftA); + _mesa_printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]); +} + + + /**********************************************************************/ /* Texture Environment */ /**********************************************************************/ diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h index 6950b211298..343f289d82a 100644 --- a/src/mesa/main/texstate.h +++ b/src/mesa/main/texstate.h @@ -1,8 +1,8 @@ -/* $Id: texstate.h,v 1.9 2002/06/17 23:36:31 brianp Exp $ */ +/* $Id: texstate.h,v 1.10 2002/12/05 04:51:57 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 4.1 + * Version: 5.1 * * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * @@ -35,6 +35,9 @@ extern void _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ); +extern void +_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ); + /*** Called from API ***/ |