LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Cornix on October 31, 2013, 21:53:18

Title: How to best use glMapBuffer with LWJGL
Post by: Cornix 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:
QuoteThe 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.
Title: Re: How to best use glMapBuffer with LWJGL
Post by: spasi on October 31, 2013, 23:54:13
You'll have to use a nightly build (http://ci.newdawnsoftware.com/job/LWJGL-git-dist/) for OpenGL 4.4, until 2.9.1 is released.