I have been looking into using glMapBufferRange and attempting to understand a few things. And I’m hoping you guys could answer a few questions I got.
If you could explain things to me like I’m 5 too that would greatly appreciated
Ok question time!
-
What is the purpose of GL_INVALIDATE_BUFFER_BIT? I thought this flag was to say everything in the current bound VBO is junk so get rid of it. Basically it is used to orphan the current bound VBO. But then I see people saying no use glBufferData and NULL right after you bind the current buffer to map to. Then I see people implying they use all both, the GL_INVALIDATE_BUFFER_BIT flag and glBufferData with NULL
-
I have read this http://www.java-gaming.org/index.php?topic=28209.0 multiple times and I’m still kind of unsure how this even works with out a Fence backup. I understand that we are trying to write to a buffer that is 6 frames in the past (so it should be fine to write to), but when I attempt this implementation with texture swaps I get garbage on the screen if my buffer count is not just right. EG: I want to render only 3 quads, all of which use a different texture. If I use 6 VBOs everything is good, change that VBO count to 8 and everything on screen looks really gross