glPolygonMode problem

Hi all!

Has anyone encountered any problems when using glPolygonMode one a DebugGL instance instead of the usual GL instance? I used a DebugGL object to scan for possible errors in my application, but I get a :

Exception in thread “AWT-EventQueue-0” javax.media.opengl.GLException: glGetError() returned the following error codes after a call to glPolygonMode(): GL_INVALID_ENUM
at javax.media.opengl.DebugGL.checkGLGetError(DebugGL.java:11724)
at javax.media.opengl.DebugGL.glPolygonMode(DebugGL.java:6360)

when using gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL). Any other valid argument combination gives the same results. Since these arguments are valid, why do I get this INVALID_ENUM error;

Thanks in advance
N

What kind of graphics card do you have and what OS are you running? Have you tried it on another machine with a different kind of graphics card to see whether it appears to be an issue with the driver incorrectly reporting an error? Do you have a small test program showing the problem?

False alarm. I was creating the DegubGL object somewhere in the middle of my gl code, and because of an error before that point (I was calling GLBegin with GL_POINT instead of GL_POINTS), I was getting a INVALID_ENUM error no matter which one was the first gl call after the DebugGL object creation. Next time I’ll try to remember that for debugging, DebugGL should be the first thing to be created on a display().