Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwantnon_cn

Posted 02 December 2012 - 02:31 PM

i am using opengles 2.0. but i think the answer will be same with openGL.
i am using VBO. every frame i bind the vertexBuffer and then use glBufferData to submit a vertexArray to GPU.the size of the vertexArray is different each frame. so i wonder if the space of the vertexBuffer reallocated every time?
i guess if the vertexArray i submit this time is bigger than last time, the space of vertexBuffer on GPU side need to reallocate, and it may inefficient. am i right? do i need to reserve space for the vertexBuffer to avoid reallocation?

i read on the opengles 2.0 reference and found the information that if we call glBufferData with * data set to NULL, it will perform space reservation, for example: glBufferData(GL_ARRAY_BUFFER, n_byte, NULL, usage);

#1wantnon_cn

Posted 02 December 2012 - 02:14 PM

i am using opengles 2.0. but i think the answer will be same with openGL.
i am using VBO. every frame i bind the vertexBuffer and then use glBufferData to submit a vertexArray to GPU.the size of the vertexArray is different each frame. so i wonder if the space of the vertexBuffer reallocated every time?
i guess if the vertexArray i submit this time is bigger than last time, the space of vertexBuffer on GPU side need to reallocate, and it is may inefficient. am i right? do i need to reserve space for the vertexBuffer to avoid reallocation?

i read on the opengles 2.0 reference and found the information that if we call glBufferData with * data set to NULL, it will perform space reservation, for example: glBufferData(GL_ARRAY_BUFFER, n_byte, NULL, usage);

PARTNERS