[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 8:54 AM, Boris Zbarsky <firstname.lastname@example.org>
All it says is:
Bind the given WebGLFramebuffer object to the given binding point
(target), which must be FRAMEBUFFER.
What should happen when target is not a FRAMEBUFFER? An exception? (If so which one?) Silently doing nothing?
This needs to be defined...
WebGL depends on OpenGL ES for a lot of its particulars. There are links to the relevant spec next to the function. Unfortunately, since they're PDFs, the section links almost never work so you have to find the section yourself, and it's a pain to read. I wish they'd bring those specs out of the PDF dark ages (but of the list of things Khronos needs to fix, that fight's far down the list, I suppose).
That said, ES doesn't actually seem to say what happens here, either. Other functions define it:
> enum CheckFramebufferStatus( enum target );
> If target is not FRAMEBUFFER, INVALID_ENUM is generated. If CheckFramebufferStatus generates an error, 0 is returned.
but bindFrameBuffer doesn't seem to have this text. That looks like an oversight, but maybe it's defined less clearly somewhere else.
GL_INVALID_ENUM is the correct answer, though.