[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] getXXXParameter issues
- To: public webgl <public_webgl@khronos.org>
- Subject: [Public WebGL] getXXXParameter issues
- From: Gregg Tavares (勤) <gman@google.com>
- Date: Thu, 10 May 2012 01:01:09 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record; bh=w6gJktgGmAuTWU4WMNtqHUaAa4qWw47IbKanUgPG4js=; b=C32laDniSkelvJzlrN3CKSeylzNIc+oAs2R/k2ml/Q3q9fxrmPvGx391yn+jBlcAvp BbrOIUD8TK2RUjP2N/wIoWDmHnAhTdFIODti0JI+zUjTiiXPgWAEto3gXJtsvdMYYKle kbWhTfdgXlfHTzbXPpEjMXuxlwJU31nGmPw43CtvI+bJ8Y8CtDZxXCjDEWk4M9FpnlgZ 4udb9GxiYyF0k2OP7HdX6ZvNB68lYhTH3iR+jgnb+hHnUroa8401hjKx0bZD31jMQfoQ 5kmWoBkZcyANm7k6GZ/4sSPz0Z1+lPEiYFJsoRStkFgzDRXqQVtedzLnaEAyi0Lq725J gL2g==
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: owner-public_webgl@khronos.org
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.