I have been reading http://www.opengl.org/wiki/Buffer_Object_Streaming#Buffer_update.
the webpage recommends orphaning, but could i do this instead?
- Allocate a buffer twice as big as i need (instead of having 2 to double buffer with)
- map the first half with glMapBufferRange(buffer, 0, len,GL_MAP_INVALIDATE_BUFFER_BIT)
- fill
- draw
- map the second half (same as 2)
- fill
my question is:
the documentation says
[quote]you will get undefined results if you are modifying parts of the buffer that already-queued GL commands (such as draw commands) will read from on the GPU
[/quote]
If i write to the other part of the buffer, will this affect the usability of the part opengl is currently using?