Hello Guest

How to best use glMapBuffer with LWJGL

  • 1 Replies
  • 5644 Views
*

Offline Cornix

  • *****
  • 488
How to best use glMapBuffer with LWJGL
« on: October 31, 2013, 21:53:18 »
Hello there.

I was recently reading through the OpenGL reference pages and noticed a function called "glBufferStorage".
http://www.opengl.org/sdk/docs/man/xhtml/glBufferStorage.xml

There it says that the user can specify how you want to access the buffer when using glMapBuffer.
The "access" flags have drawn my special attention, most of all the "GL_MAP_PERSISTENT" flag:
Quote
The client may request that the server read from or write to the buffer while it is mapped. The client's pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
Now, the problem is that I cant find this function in LWJGL. It is only available since OpenGL version 4.4, but LWJGL seems to go up to 4.3 only.

My question is:
Is there any way to use the "GL_MAP_PERSISTENT" flag with LWJGL?
Its said that this would improve performance greatly since it would allow to upload vertex data to the graphics card without stalling the rendering process.

Thank you very much.

*

Online spasi

  • *****
  • 2261
    • WebHotelier
Re: How to best use glMapBuffer with LWJGL
« Reply #1 on: October 31, 2013, 23:54:13 »
You'll have to use a nightly build for OpenGL 4.4, until 2.9.1 is released.