Hi all, thanks in advance for the help.
I’m trying to make calls to glCallList and glNewList by passing an integer variable as my parameter.
That is, I have a static Integer id, and I call using gl.glCallList(id) and also gl.glNewList(id, GL.GL_COMPILE).
However, I get a big GL exception when I try this. The only way I’ve found of not running into an error is if I pass an actual integer as a parameter (something like glCallList(5)).
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: glGetError() returned the following error codes after a call to glNewList(): GL_INVALID_VALUE
at javax.media.opengl.DebugGL.checkGLGetError(DebugGL.java:12715)
at javax.media.opengl.DebugGL.glNewList(DebugGL.java:6151)
at ObjMaker.drawObject(ObjMaker.java:23)
at Node.apply(Node.java:232)
at Node.apply(Node.java:237)
at SceneGraph.draw(SceneGraph.java:99)
at Main.display(Main.java:52)
Can variables be passed to these methods?
UPDATE: Ah…0 isn’t allowed. That was the problem. Thanks anyway :