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

Re: [Public WebGL] getXXXParameter issues

On Thu, May 10, 2012 at 1:01 AM, Gregg Tavares (勤) <gman@google.com> wrote:
> I updated gl-object-get-calls to check for invalid enums and couple of
> issues came up.
> 1) The WebGL spec says if the parameter is invalid then 'null' is returned.
> specifically not 'undefined'. Some browsers don't appear to be returning
> 'null' so I thought I should double check.
> 2) For pretty much all these functions the WebGL spec only defines what is
> returned when the 'pname' argument is invalid.
> For some functions like
>    getTexParameter(target, pname)
>    getBufferParameter(target, pname)
>    getRenderbufferParameter(target, pname);
> It doesn't say specifically what they return when the 'target' argument is
> invalid. For now I'm assuming they
> should return 'null' in those cases too but I just thought I'd bring it up.
> The spec probably needs to be updated.
> Similarly
>    getFramebufferAttachmentParameter(target, attachment, pname)
> Also has an 'attachment' parameter that can be invalid.
>    getVertexAttrib(index, pname);
> has an index parameter that can be invalid.

Thanks for pointing out these issues. Updated the specs for all of
these entry points to indicate that if an OpenGL error is generated
(not just the ones in the WebGL spec, but those implicitly referenced
in the OpenGL ES 2.0 spec), they return null.


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