[Public WebGL] Oversight in bufferData and bufferSubData specification

Kenneth Russell [email protected]
Fri May 20 18:50:33 PDT 2011

In the bufferData and bufferSubData variants taking ArrayBufferView,
we failed to specify what happens if a Float64Array is passed.
http://www.khronos.org/registry/webgl/specs/latest/#5.12 mentions that
Float64Array can not be used with WebGL, but does not specify what
happens if an attempt is made.

The other entry points which take ArrayBufferView (readPixels,
texImage2D, texSubImage2D) also take a type enum, and generate
INVALID_OPERATION if that type enum and the type of the
ArrayBufferView do not match. Therefore, these entry points will
already generate INVALID_OPERATION in this case.

Options seem to be:

 1. Generate an INVALID_VALUE OpenGL error if a Float64Array is passed.
 2. Change the IDL in the WebGL spec to explicitly enumerate all of
the ArrayBufferView subclasses accepted for bufferData, bufferSubData,
readPixels, texImage2D, and texSubImage2D.

Firefox 4 currently has a bug where it silently accepts Float64Arrays
for bufferData, so some change is definitely needed.

I would probably recommend (2) despite the slight explosion in the IDL
because it's most compatible with the intent of the spec. This would
mean that an exception would be raised per the Web IDL spec.

You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list