Hi!
I’m trying to create a renderer using LWJGL. It uses glMapBufferRange( … GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT)
and 3 VBOs picked with round robin. I managed to get some okay FPS but I have troubles with textures.
My shader has a sampler2D[32] array so I need to flush when I have more than 32 textures.
If I have less than 32 it’s fine becuase then I can just put everything into one buffer and draw that.
Else I have to unmap the buffer draw all the current elements in the buffer then begin a new drawcall.
Problem is when I begin again I still have let’s say half of the data I wanted to push into to the buffer I just unmaped.
If I want to call the glMapBufferRange() on the same buffer again the program crashes.
I hope I managed to explain it well enough for s’one to help me.
The technique I tried to implement can be found here if you didn’t get my post. (the triple buffering one)
(I can’t post code atm because I left it on my other PC)