Let's say I have a buffer object with some data.
I use glMapBufferc GL_WRITE_ONLYand write every second byte (think alternating vertex attributes).
Then I have a glUnmapBufferbuffer.
Are bytes that I did not write to save, or are they now undefined?
I am interested, because the main goal GL_WRITE_ONLYis to avoid transferring the previous contents of the buffer from the memory of the card to main memory. However, the driver does not know for what bytes I actually wrote something to partially update the buffer.
Thus, either the driver first transfers the contents to the main memory, and makes rendering GL_WRITE_ONLYpointless on almost every platform that I could think of. Or it’s supposed that I am writing the full displayed area. However, the manual does not mention such a commitment.
source
share