[Mesa-dev] [PATCH 02/12] mesa: Improve a glTexEnv error message by looking up the enum.

Eric Anholt eric at anholt.net
Fri Jan 18 14:30:37 PST 2013


---
 src/mesa/main/texenv.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index e8f3af0..73c1d06 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -507,7 +507,8 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
       }
    }
    else {
-      _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)",target );
+      _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(target=%s)",
+                  _mesa_lookup_enum_by_nr(target));
       return;
    }
 
-- 
1.7.10.4



More information about the mesa-dev mailing list