[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] getXXXParameter issues
- To: Gregg Tavares (勤) <gman@google.com>
- Subject: Re: [Public WebGL] getXXXParameter issues
- From: Kenneth Russell <kbr@google.com>
- Date: Wed, 16 May 2012 20:36:11 -0700
- Cc: public webgl <public_webgl@khronos.org>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record; bh=qqDxaPwOnCJRk0D+F/rRoGNV+F2abGvLOIaUAAmww5w=; b=YmNyho6PNwOwhtUYPXHNWok12z7E8TBDKdc4VQxKpdAK/2WRbLmngFPt4JynE2gzOc 54wXmo62rbfbcJs5pfaxuEyice1Cyl1Mj1tYuE0Iuj2pjGnq/H6TvARMGasLdYWcmJBU y+mFH6TiD7mbmYhg/Lcn1suXX3cqzwWuQ9FIlcdvvqVSIiD03A/Owsf8uUU8prdtmPuS 42jP/O8vS7vmVN6dJWFeEv1lTtPRgz94BhlPxLJCeU1GGr5KVkCck4G/zn9AqMiye5od UytGI6a6wr+Svl7pY7NuX2oDPAkznjnQBsJ2x4t58hFIbDo35dOGGO1CYKCm1cKpnq3E SAoQ==
- In-reply-to: <CAKZ+BNp1y6=g+xAfba=NLmzs67vPqY5x+m-uU-v8sSEf+xuh4w@mail.gmail.com>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <CAKZ+BNp1y6=g+xAfba=NLmzs67vPqY5x+m-uU-v8sSEf+xuh4w@mail.gmail.com>
- Sender: owner-public_webgl@khronos.org
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.
-Ken
-----------------------------------------------------------
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
-----------------------------------------------------------