[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





----- Original Message -----
> 
> 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?

As others already said, the WebGL spec falls through to the GL spec here, which specifies (without any surprise) GL_INVALID_ENUM, for which the WebGL equivalent is webgl.INVALID_ENUM.

WebGL does not use exceptions as a general error-reporting mechanism, only uses exceptions in a few explicitly specified cases. So, since it doesn't mention an exception here, it clearly means no exception.

If the is why aren'y JS exceptions the primary error reporting mechanism in WebGL, that's because, while half of errors are caught by the WebGL implementation before calling OpenGL, another half of errors come straight from OpenGL. To consistently generate a JS exception on every WebGL/OpenGL error after every call, we would have to call glGetError after every call, which in many cases would force a full sync with the GL (equivalent to glFinish()), removing the asynchronous nature of the GL, killing performance.

Cheers,
Benoit


> 
> This needs to be defined...
> 
> -Boris
> 
> -----------------------------------------------------------
> 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
> -----------------------------------------------------------
> 
> 

-----------------------------------------------------------
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
-----------------------------------------------------------