getting the name of OpenGL errors

hello

the error code of an opengl error can easily be gotten by
gl.glGetError();

now is there an easy way to get the human readable name of this error, without a huge switch-case block?

thanks!

There are only 7 or so error codes, so the switch doesn’t seem that big a deal. You can’t get a very specific error description out of OpenGL though. You basically have to deduce what actually went wrong based on the context in which the error occurs. DebugGL helps…

The DebugGL pipeline will give you the error name, so you could either switch to using it when debugging, or look into it’s source to see how it’s done.

glu.gluGetString(int)

thanks guys!