glFramebufferTextureLayer

glFramebufferTextureLayer: man4/glFramebufferTextureLayer.xml

glFramebufferTextureLayer and glNamedFramebufferTextureLayer attach a single layer of a three-dimensional or array texture object as one of the logical buffers of the specified framebuffer object. Textures cannot be attached to the default draw and read framebuffer, so they are not valid targets of these commands. For glFramebufferTextureLayer, the framebuffer object is that bound to target, which must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER, or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. For glNamedFramebufferTextureLayer, framebuffer is the name of the framebuffer object. attachment specifies the logical attachment of the framebuffer and must be GL_COLOR_ATTACHMENT, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT or GL_DEPTH_STENCIL_ATTACHMENT. in GL_COLOR_ATTACHMENT may range from zero to the value of GL_MAX_COLOR_ATTACHMENTS minus one. Attaching a level of a texture to GL_DEPTH_STENCIL_ATTACHMENT is equivalent to attaching that level to both the GL_DEPTH_ATTACHMENT the GL_STENCIL_ATTACHMENT attachment points simultaneously. If texture is not zero, it must be the name of a three-dimensional, two-dimensional multisample array, one- or two-dimensional array, or cube map array texture. If texture is a three-dimensional texture, then level must be greater than or equal to zero and less than or equal to $log_2$ of the value of GL_MAX_3D_TEXTURE_SIZE. If texture is a two-dimensional array texture, then level must be greater than or equal to zero and less than or equal to $log_2$ of the value of GL_MAX_TEXTURE_SIZE. For cube map textures, layer is translated into a cube map face according to $$ face = k \bmod 6. $$ For cube map array textures, layer is translated into an array layer and face according to $$ layer = \left\lfloor { layer \over 6 } \right\rfloor$$ and $$ face = k \bmod 6. $$

@OpenGL_Version(OGLIntroducedIn.V3P0)
@OpenGL_Extension("GL_ARB_framebuffer_object")
fn_glFramebufferTextureLayer glFramebufferTextureLayer;

See Also

glGenFramebuffers, glBindFramebuffer, glGenRenderbuffers, glFramebufferTexture,

Meta