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

[Public WebGL] Color reads from FBs with no ColorAttachment0



I can't find any language in GLES or GL about ReadPixels generating an error when there's no ColorAttachment0 (or ColorAttachmentI with ReadBuffer) to read from.

Things that are mentioned:
* INVALID_OP if ReadPixels `type` is float-y and the source is not, or vice versa.
* INVALID_OP if ReadPixels `format` is DEPTH_COMPONENT, STENCIL_INDEX, or DEPTH_STENCIL and the source is missing any of the respective buffers.
* INVALID_OP if the source is not FRAMEBUFFER_COMPLETE

However, depth-only FBs can be FRAMEBUFFER_COMPLETE, which throws a wrench in things.

The options:
* zero-fills
* [0,0,0,255]-fill (Chrome does this)
* INVALID_OPERATION (Firefox does this)

Thoughts? Maybe Mark or someone else knows more from the GL(ES) specs.

-Jeff

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