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

Re: [Public WebGL] Not clear what getProgramParameter should do if the passed-in pname is not on the whitelist



Passing a pname that is not valid will generate an INVALID_ENUM error. In GL/ES the get*v get passed a pointer to the storage for the value (return by pointer), in case of an invalid enum, they would not touch this storage. As the semantic in WebGL is return by value, we cannot derive the behavior from the ES specification, as it would be impossible to reliably distinguish between an error/untouched value and an actual return value without consulting the error state (which we shouldn't do due to this being slow). I think WebGL would be free to define this behavior independently of ES.

On Tue, Apr 17, 2012 at 5:56 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

The ES spec doesn't seem to say, offhand.  Neither does WebGL.  Gecko seems to return null in practice...

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