diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/matrix.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 76ca28451f..8204c258a6 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -10,9 +10,9 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -234,7 +234,15 @@ _mesa_PushMatrix( void ) _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); if (stack->Depth + 1 >= stack->MaxDepth) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix" ); + if (ctx->Transform.MatrixMode == GL_TEXTURE) { + _mesa_error(ctx, GL_STACK_OVERFLOW, + "glPushMatrix(mode=GL_TEXTURE, unit=%d)", + ctx->Texture.CurrentUnit); + } + else { + _mesa_error(ctx, GL_STACK_OVERFLOW, "glPushMatrix(mode=%s)", + _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); + } return; } _math_matrix_copy( &stack->Stack[stack->Depth + 1], @@ -266,7 +274,15 @@ _mesa_PopMatrix( void ) _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); if (stack->Depth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix" ); + if (ctx->Transform.MatrixMode == GL_TEXTURE) { + _mesa_error(ctx, GL_STACK_UNDERFLOW, + "glPopMatrix(mode=GL_TEXTURE, unit=%d)", + ctx->Texture.CurrentUnit); + } + else { + _mesa_error(ctx, GL_STACK_UNDERFLOW, "glPopMatrix(mode=%s)", + _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); + } return; } stack->Depth--; |