LWJGL
May 25, 2013, 05:34:32 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Window.update() => OpenGLException: Invalid enum (1280)  (Read 2045 times)
TrnsltLife
Newbie
*
Posts: 1


« on: May 07, 2004, 21:06:43 »

Anybody have any idea what this error is?  I'm trying to compile the NeHe tutorials that I got from somewhere in this forum:  I had to update the code to .9, mostly just changing GL. to GL11. , and updating the import statments.  But in Lesson07 and Lesson08, I also changed:

GL11.glLightfv to GL11.glLight, e.g.:
GL11.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, (FloatBuffer)temp.asFloatBuffer().put(lightAmbient).flip());   

I'm not sure if that's relevant, but the already-compiled Lesson07 and Lesson08 ran, while my newly compiled one does not run.  There are no compile-time errors, just this one runtime error:

org.lwjgl.opengl.OpenGLException: Invalid enum (1280)
        at org.lwjgl.opengl.Util.checkGLError(Unknown Source)
        at org.lwjgl.opengl.Window.update(Unknown Source)
        at Lesson08.main(Lesson08.java:63)

Any clue what could cause this?
Logged
Orangy Tang
Talks Too Much
***
Posts: 199



« Reply #1 on: May 08, 2004, 04:26:01 »

OpenGL gets checked for errors at the end of every frame, so you don't have to Smiley Basically 'somewhere' in your rendering code / previous frame you've used the wrong constant/enum to an OpenGL call (my personal pet mistake is confusing GL_PROJECTION and GL_PROJECTION_MATRIX etc.)

Easiest way to track it down is to just comment out huge chunks of code until you narrow it down to the individual method call. And don't forget to check your init code as well, odds are it's happening on the first frame.
Logged
cfmdobbie
Prolific Timewaster
****
Posts: 366



« Reply #2 on: May 08, 2004, 05:47:38 »

If you like, post the whole code and see if anyone can spot the problem immediately.
Logged

ellomynameis Charlie Dobbie.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!