mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
added _mesa_print_texunit_state() for debugging
This commit is contained in:
parent
93e0ba8b80
commit
6cb5b3475d
2 changed files with 37 additions and 4 deletions
|
|
@ -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 */
|
||||
/**********************************************************************/
|
||||
|
|
|
|||
|
|
@ -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 ***/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue