3.6.1 Framebuffer attachments

It is possible to capture most framebuffer attachments, including all color attachments and the depth and stencil attachments.

In the following example, three squares are drawn on screen with varying depths moving from -1.0 towards 0.0, with a colored cube rendered behind them. The draw calls for the four shapes have different values set for the stencil buffer write mask, with the stencil pass operation set to GL_REPLACE.

Table 3-1 Example frame buffer attachments

Color attachment Depth attachment Stencil attachment

The color attachment shows which colors are rendered to the screen in that frame. It is the normal screen output image that you get when you take a capture. To investigate a graphics rendering problem, you can also capture other framebuffers.

The depth attachment helps you find rendering defects where fragments are being shaded in front of or behind other fragments incorrectly. Depth values are stored with the color when a fragment is shaded. Depth attachment values range from -1.0 to 1.0, where -1.0 is full blue, 0.0 is black, and 1.0 is full red. When subsequent fragments are drawn, the depth values are compared to determine whether the new color is in front of or behind the one already drawn. If you get the depth values wrong, then this view makes it easier to see what is happening. The output is enhanced on the host to increase contrast.

The stencil attachment shows where you have used stencil values to control which fragments are drawn. Stencil attachment values are from 0-255, where 0 is black, and 255 is red.

For information about capturing framebuffer attachments, see 3.6 Capturing framebuffer content.

Limitations on capturing all framebuffer attachments

  • It is not possible to capture the depth or stencil attachments for FBO 0 on an OpenGL ES 2.0-only configuration.
  • Only a low-resolution capture of the depth buffer is possible when:
    • The configuration does not support depth texture sampling.
    • The device only has OpenGL ES 2.0 available and the depth attachment is a renderbuffer.
Non-Confidential - RELPDF file icon PDF version101545__00_en
Copyright © 2020–2022, 2024 Arm Limited or its affiliates. All rights reserved.