Graphics Reference
In-Depth Information
Figure 12-1 shows the relationships among framebuffer objects,
renderbuffer objects, and textures. Note that there can be only one color,
depth, and stencil attachment in a framebuffer object.
Texture mip Images
Color
Attachments
Color
Attachments
Depth
Attachment
Depth
Attachment
Depth
Buffer
p
Buffer
Depth
Stencil
Attachment
Stencil
Buffer
Framebuffer Objects
Framebuffer Objects
Renderbuffer Objects
Renderbuffer Objects
Figure 12-1
Framebuffer Objects, Renderbuffer Objects, and Textures
Choosing a Renderbuffer Versus a Texture as a Framebuffer
Attachment
For render-to-texture use cases, you would attach a texture object to the
framebuffer object. Examples include rendering to a color buffer that will
be used as a color texture, and rendering into a depth buffer that will be
used as a depth texture for shadows.
There are several reasons to use renderbuffers instead of textures:
• Renderbuffers support multisampling.
• If the image will not be used as a texture, using a renderbuffer may
deliver a performance advantage. This advantage occurs because the
implementation might be able to store the renderbuffer in a much
more efficient format, better suited for rendering than for texturing.
The implementation can only do so, however, if it knows in advance
that the image will not be used as a texture.
 
 
Search WWH ::




Custom Search