Graphics Reference
In-Depth Information
If
glFramebufferTexture2D
is called with
texture
not equal to zero,
then the color, depth, or stencil attachment will be set to
texture
. If
glFramebufferTexture2D
generates an error, no change is made to the
state of the framebuffer.
The attachment point's state will be modified to
• Object type =
GL_TEXTURE
• Object name =
texture
• Texture level =
level
• Texture cubemap face = valid if the texture attachment is a cubemap
and is one of the following values:
GL_TEXTURE_CUBE_MAP_POSITIVE_X
GL_TEXTURE_CUBE_MAP_POSITIVE_Y
GL_TEXTURE_CUBE_MAP_POSITIVE_Z
GL_TEXTURE_CUBE_MAP_NEGATIVE_X
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
• Texture layer =
0
The newly attached texture object's state or contents of its image are
not modified by
glFramebufferTexture2D
. Note that the texture
object's state and image can be modified after it has been attached to a
framebuffer object.
If
glFramebufferTexture2D
is called with
texture
equal to zero, then
the color, depth, or stencil attachment is detached and reset to zero.
Attachment
The
glFramebufferTextureLayer
command is used to attach a 2D slice
and a specific mip level of a 3D texture or a level of 2D array textures to
a framebuffer attachment point. Refer to Chapter 9, “Texturing,” for a
detailed description of how 3D textures work.