LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Haroogan on July 15, 2011, 08:34:45

Title: glBufferSubData
Post by: Haroogan on July 15, 2011, 08:34:45
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?
Title: Re: glBufferSubData
Post by: spasi on July 15, 2011, 09:08:11
It's not excessive, because then you wouldn't be able to update a big buffer object with a small ByteBuffer.
Title: Re: glBufferSubData
Post by: Haroogan on July 15, 2011, 09:12:41
NVM, I got it :)