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

Re: [Public WebGL] bindFrameBuffer doesn't seem to define behavior when target is not a FRAMEBUFFER



On Sat, Mar 31, 2012 at 9:39 AM, Cedric Vivier <cvivier@mozilla.com> wrote:
On Sat, Mar 31, 2012 at 14:54, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> What should happen when target is not a FRAMEBUFFER? ÂAn exception? Â(If so
> which one?) Silently doing nothing?
>
> This needs to be defined...

It is defined in the referenced OpenGL ES 2.0 specification Â4.4.3 :
"INVALID_ENUM is generated if target is not FRAMEBUFFER"

Section 4.4.3 covers renderbuffers, not framebuffers. bindFrameBuffer is in section 4.4.1, and I don't see any mention of INVALID_ENUM in 4.4.1.

Unless I'm missing it, this seems like an oversight in the spec.

> I'm guessing, based on thirdhand information, that the call is silently
> ignored but getError() will return GL_INVALID_ENUM if called after that....
> ÂBut that's not actually in the spec anywhere that I can find.

It is defined in the referenced glBindFramebuffer man page :
http://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindFramebuffer.xml

Manpages aren't specifications, they're user documentation. They're not appropriate as normative definitions; this needs to be defined in the OpenGL ES spec.

On Sat, Mar 31, 2012 at 9:50 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
Yes, but nothing in WebGL seems to define what should happen with GL_INVALID_ENUM in the ES binding.

The ES spec defines what generating an error does, in section 2.5 "GL Errors". The errors are detected with the getError binding, which maps to the underlying glGetError call.

For the cases where WebGL itself generates errors, those should probably reference 2.5 somehow, though.

--
Glenn Maynard