glBufferSubData usage

Started by
0 comments, last by soconne 19 years, 2 months ago
I'm trying to use glBufferSubData, but I'm not getting correct results. I have a 512x512 piece of terrain and I want to update vertices 0-33. So I call glBufferSubData(GL_ARRAY_BUFFER_ARB, 0, 33, buffer), where buffer contains a pointer to the updated vertex information. But this only updates the first 4 vertices. I then tried changing 33 to 33*sizeof(float), but it only updated the first 23 vertices. Can someone tell me what the offset and size parameters are suppose to be ?
Author Freeworld3Dhttp://www.freeworld3d.org
Advertisement
Nevermind, I simply forgot to do 33*sizeof(float)*3 since there are an x,y,z components.
Author Freeworld3Dhttp://www.freeworld3d.org

This topic is closed to new replies.

Advertisement