buffer update: do i understand correctly?

I have been reading http://www.opengl.org/wiki/Buffer_Object_Streaming#Buffer_update.

the webpage recommends orphaning, but could i do this instead?

  1. Allocate a buffer twice as big as i need (instead of having 2 to double buffer with)
  2. map the first half with glMapBufferRange(buffer​, 0, len,GL_MAP_INVALIDATE_BUFFER_BIT​)
  3. fill
  4. draw
  5. map the second half (same as 2)
  6. 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?

I see what you’re doing. I’m just wondering if i could avoid extra VBOS by having one large VBO and double or triple buffer with the separate regions.

Or should i just map with unsynchronized, then orphan?

unsynchronized + orphaning makes no sense, as orphaning is used as a signal to the driver that a memory region is released by the client. With unsynchronized access, there is no need to signal the driver, as you’re in charge of memory (locking).

And whether you can merge my six (!) VBOs into a single VBO? I don’t know - I think so. Just try it.