Graphics Reference
In-Depth Information
a renderbuffer object or a texture. As shown in Figure 12-1, the color
attachment can be set to a renderbuffer that stores color values, or
to a mip level of a 2D texture or a cubemap face, or to a layer of a
2D array textures, or to a mip level of a 2D slice in a 3D texture. The
depth attachment can be set to a renderbuffer that stores depth values
or packed depth and stencil values, to a mip level of a 2D depth texture,
or to a depth cubemap face. The stencil attachment must be set to
a renderbuffer that stores stencil values or packed depth and stencil
values.
Attaching a Renderbuffer as a Framebuffer Attachment
The glFramebufferRenderbuffer command is used to attach a
renderbuffer object to a framebuffer attachment point.
void glFramebufferRenderbuffer (GLenum target ,
GLenum attachment ,
GLenum renderbuffertarget ,
GLuint renderbuffer )
target
must be set to GL_READ_FRAMEBUFFER ,
GL_DRAW_FRAMEBUFFER , or GL_FRAMEBUFFER
attachment
must be one of the following enums:
GL_COLOR_ATTACHMENTi
GL_DEPTH_ATTACHMENT
GL_STENCIL_ATTACHMENT
GL_DEPTH_STENCIL_ATTACHMENT
renderbuffertarget
must be set to GL_RENDERBUFFER
renderbuffer
the renderbuffer object that should be used as
attachment; the renderbuffer must be either
zero or the name of an existing renderbuffer
object
If glFramebufferRenderbuffer is called with renderbuffer not equal
to zero, this renderbuffer object will be used as the new color, depth, or
stencil attachment point as specified by the value of the attachment
argument.
 
 
 
Search WWH ::




Custom Search