NPE in glDeleteBuffersARB

Started by Anubis, June 19, 2009, 02:22:02

Previous topic - Next topic

Anubis

Hi,

I am using LWJGL in conjunction with the jmonkeyengine.  I have been encountering the following NPE whenever "ARBBufferObject.glDeleteBuffersARB" is called after updating a heightmap.  I don't think this is a jme problem since GLContext.getCapabilities() returns null on line 49.

      java.lang.NullPointerException
   at org.lwjgl.opengl.ARBBufferObject.glDeleteBuffersARB(ARBBufferObject.java:50)
   at com.jme.scene.state.lwjgl.records.RendererRecord.deleteVBOId(RendererRecord.java:126)
   at com.jme.renderer.lwjgl.LWJGLRenderer.deleteVBO(LWJGLRenderer.java:1692)
   at com.jme.renderer.lwjgl.LWJGLRenderer.deleteVBO(LWJGLRenderer.java:1681)
   at com.jmex.terrain.TerrainBlock.updateFromHeightMap(TerrainBlock.java:651)
   at com.jmex.terrain.TerrainPage.updateFromHeightMap(TerrainPage.java:236)
   at com.jmex.terrain.TerrainPage.updateFromHeightMap(TerrainPage.java:234)
   at com.jmex.terrain.TerrainPage.updateFromHeightMap(TerrainPage.java:234)


I am using latest 2.1.0 LWJGL on WinXP GeForce 8800GT

Anubis

Never mind.  Turns out I was not calling this on open gl thread.  Made incorrect assumption that AWT input thread was same as open gl thread.  The "null" from GLContext.getCapabilities() gave me the hint  ;)