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

[Public WebGL] Re: Framebuffer attachment point

No response?

I recommend we post the same restriction in framebufferTexImage2D as
in framebufferRenderbuffer, i.e., if the texture internal format does
not match the attachment point, an INVALID_OPERATION error will be
generated.  Since GLES2 only allows color texture, the only valid
attachment point for framebufferTexImage2D will be COLOR_ATTACHMENT0.

The benefits of doing this is, (1) framebufferTexImage2D and
framebufferRenderbuffer will be under the same constraint rule; (2)
implementation wise, it is a much clearer solution.

If there is a reason we shouldn't do this, please respond.

- Mo

On Fri, Jun 4, 2010 at 12:19 PM, Mo, Zhenyao <zhenyao@gmail.com> wrote:
> In WebGL spec section 6.2, when internal format of a renderbuffer does
> not match the attachment point, an INVALID_OPERATION error is
> generated.
> In the same spirit, shouldn't we generate the same INVALID_OPERATION
> for framebufferTexImage2D when the attachment is STENCIL or DEPTH?  In
> GLES, we don't have a way to generate non color textures.
> Also, is it really necessary that we check internal format of
> renderbuffer/texture when attaching it to a framebuffer?  This
> dictates we has to call texImage2D or renderbufferStorage before
> attaching.   Shouldn't we just follow GLES and allow the mismatch?  So
> we can attach and later change the internalformat of
> renderbuffer/texture and make the framebuffer complete.

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: