Sign in to follow this  

glBufferSubData usage

Recommended Posts

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 ?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this