소스 검색

added _mesa_print_texunit_state() for debugging

tags/vtx-0-2-21112003-freeze
Brian Paul 23 년 전
부모
커밋
6cb5b3475d
2개의 변경된 파일37개의 추가작업 그리고 4개의 파일을 삭제
  1. 32
    2
      src/mesa/main/texstate.c
  2. 5
    2
      src/mesa/main/texstate.h

+ 32
- 2
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 */
/**********************************************************************/

+ 5
- 2
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 ***/


Loading…
취소
저장