diff options
author | Brian Paul <[email protected]> | 2012-06-26 14:47:19 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-06-27 07:50:56 -0600 |
commit | dcf1dafa9ec93f9300ecffe5bddfd2b131bc218f (patch) | |
tree | 95c8958a23e97dc64798e984e568e293c890eae0 /src/mesa/main | |
parent | 86ccd9aaacc5358984faa11c3b94281f0b1a85f9 (diff) |
mesa: look up enum name for glEnable/Disable errors
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/enable.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index d0b4625806f..c811f2a9c74 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -161,8 +161,8 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) return; invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", - state ? "Enable" : "Disable", cap); + _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(%s)", + state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap)); } @@ -937,8 +937,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) return; invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", - state ? "Enable" : "Disable", cap); + _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(%s)", + state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap)); } @@ -1441,6 +1441,7 @@ _mesa_IsEnabled( GLenum cap ) return GL_FALSE; invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap); + _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(%s)", + _mesa_lookup_enum_by_nr(cap)); return GL_FALSE; } |