Hello Guest

[FIXED] Null Buffers with glBitmap throws NullPointer

  • 2 Replies
  • 8441 Views
*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
[FIXED] Null Buffers with glBitmap throws NullPointer
« on: March 22, 2013, 19:04:03 »
This is from the OpenGL reference pages:
Quote
To 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)

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: Null Buffers with glBitmap throws NullPointer
« Reply #1 on: March 22, 2013, 19:32:27 »
Thanks, fixed: glBitmap now allows a null bitmap buffer.

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Null Buffers with glBitmap throws NullPointer
« Reply #2 on: March 22, 2013, 23:59:03 »
Cheers