[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGL bufferSubData lacks "size" parameter

The data argument of the bufferSubData call can be a typed array or
view, as such it carries a byte length, this length is what is used to
set the size argument. You do not need another argument in order to
pass in the size. Just pass in an array or view with the desired byte

On Wed, Jan 11, 2012 at 8:27 PM, Chananya Freiman
<spectralcanine@gmail.com> wrote:
> I realize that WebGL is supposed to be a compact user-friendly API which is
> why a lot of things are very limited, but why doesn't bufferSubData have a
> varitation that takes size?
> The current variations shatter any hope for speed when you want to update
> small parts of a big buffer.
> The following should be defined too:
> void bufferSubData (GLenum target, GLintptr offset, GLintptr size,
> ArrayBufferView data);
> void bufferSubData (GLenum target, GLintptr offset, GLintptr size,
> ArrayBuffer data);
> Right now I need to copy a buffer size above 3 MB just to update 4 indices,
> and it ruins the FPS of my code completely.

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl