[Public WebGL] WebGL IDL for uniform1fv is not valid WebIDL

Boris Zbarsky [email protected]
Mon Apr 2 07:48:32 PDT 2012

The IDL in question is:

     void uniform1fv(WebGLUniformLocation? location, Float32Array v);
     void uniform1fv(WebGLUniformLocation? location, float[] v);

Unfortunately if you look at the table at 
http://dev.w3.org/2006/webapi/WebIDL/#dfn-distinguishable you see that 
T[] and an interface type (which is what Float32Array is) are only 
distinguishable if the interface type doesn't support indexed 
properties.  Which Float32Array does, of course.  So this IDL fails this 
requirement from the section linked above:

   If there is more than one entry in an effective overload set that has
   a given type list length, then for those entries there MUST be an
   index i such that for each pair of entries the types at index i are

Cameron, I'm not sure why exactly interface types with indexed 
properties are not distinguishable from IDL arrays.  For non-callback 
interfaces, it seems like the UA could tell them apart and we could 
define that the interface version is called if the right interface is 
passed in, else the array version is called.

But failing changes to WebIDL, the IDL here would need to change somehow.


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