| Non-Confidential - REL | 101545__00_en | |||
| ||||
| Home > Getting started > Capturing framebuffer content > 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.