Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMarkS

Posted 05 July 2013 - 02:23 PM

When you call glBufferData, you are telling the GPU how much memory to set aside for the buffer. First, use GL_DYNAMIC_DRAW if you are going to be changing the buffer.

 

I am not too sure about the potential consequences, if any, of calling glBufferData multiple times on the same buffer. I would surmise that changing the buffer size could trash the data stored in the VRAM. I *think* that glBufferData is similar to calling "new" on a pointer. If you need to update part of the buffer, use glBufferSubData.


#1MarkS

Posted 05 July 2013 - 02:21 PM

When you call glBufferData, you are telling the GPU how much memory to set aside for the buffer. First, use GL_DYNAMIC_DRAW if you are going to be changing the buffer. Also, I am not too sure about the potential consequences, if any, of calling glBufferData multiple times on the same buffer. If you need to update part of the buffer, use glBufferSubData.


PARTNERS