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

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




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