[Public WebGL] WebGL IDL includes overloads that are not allowed in WebIDL

Boris Zbarsky [email protected]
Mon Apr 2 07:19:27 PDT 2012


Specifically, it has:

     void bufferSubData(unsigned long target, long long offset, 
ArrayBufferView? data);
     void bufferSubData(unsigned long target, long long offset, 
ArrayBuffer? data);

This is not allowed because if null is passed for the third argument the 
overload resolution algorithm would not be able to decide which of the 
two overloads to invoke.

I'm not quite sure why this is using a nullable type at all, honestly. 
For one thing, the spec doesn't quite define behavior when null is 
passed.  OpenGL ES section 2.9 has, for this function, the signature:

   void BufferSubData( enum target, intptr offset, sizeiptr size,
                       const void* data );

and doesn't really define what happens for null |data| (contrast with 
BufferData earlier in that section, which explicitly says behavior is 
undefined if data is null; the IDL for bufferData doesn't allow a null 
data argument, though).

-Boris



-----------------------------------------------------------
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