glBufferSubData

Started by Haroogan, July 15, 2011, 08:34:45

Previous topic - Next topic

Haroogan

Let's take a look at this function, for instance:

glBufferSubData(int target, long offset, java.nio.ByteBuffer data)


I suppose that ByteBuffer's position and limit tell the size (e. g. remaining). Ok, then position should also tell the same thing as offset does, then why there is offset here? I mean offset is excessive in this case, isn't it?

spasi

It's not excessive, because then you wouldn't be able to update a big buffer object with a small ByteBuffer.

Haroogan