/*
* 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"),
_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],
_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--;