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

Re: [Public WebGL] getXXXParameter issues

Many thanks for all this work on tests!

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.


   getFramebufferAttachmentParameter(target, attachment, pname)

Also has an 'attachment' parameter that can be invalid.

   getVertexAttrib(index, pname);

has an index parameter that can be invalid.