[FIXED] Null Buffers with glBitmap throws NullPointer

Started by quew8, March 22, 2013, 19:04:03

Previous topic - Next topic

quew8

This is from the OpenGL reference pages:
QuoteTo set a valid raster position outside the viewport, first set a valid raster position inside the viewport, then call glBitmap with NULL as the bitmap parameter and with xmove and ymove set to the offsets of the new raster position.
But when you do this using LWJGL, when it checks the buffer size, you get a NullPointerException. Whilst it's easy enough to load an empty PBO into memory, I don't think it's an ideal solution.
Relevant stack trace:
Quote
Exception in thread "main" java.lang.NullPointerException
   at org.lwjgl.BufferChecks.checkBufferSize(BufferChecks.java:188)
   at org.lwjgl.BufferChecks.checkBuffer(BufferChecks.java:230)
   at org.lwjgl.opengl.GL11.glBitmap(GL11.java:636)

spasi

Thanks, fixed: glBitmap now allows a null bitmap buffer.

quew8