GLFRAMEBUFFERTEXTURE(3G)
π NAME π
Okay so this is the GLFRAMEBUFFERTEXTURE(3G) manual page, and the main characters are glFramebufferTextureLayer and glNamedFramebufferTextureLayer β they attach a single layer of a texture object as a logical buffer of a framebuffer object. periodt. π«Ά
β¨ C SPECIFICATION β¨
void glFramebufferTextureLayer(GLenum target, GLenum attachment,
GLuint texture, GLint level,
GLint layer);
void glNamedFramebufferTextureLayer(GLuint framebuffer,
GLenum attachment, GLuint texture,
GLint level, GLint layer);
π PARAMETERS π
targetβ the target the framebuffer is bound to forglFramebufferTextureLayer. That's the whole vibe.framebufferβ the name of the framebuffer object forglNamedFramebufferTextureLayer.attachmentβ the attachment point of the framebuffer.textureβ the name of an existing texture object to attach.levelβ the mipmap level of the texture object to attach.layerβ the layer of the texture object to attach.
πΈ DESCRIPTION πΈ
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. π¨ Not me attaching textures to the default draw and read framebuffer though β 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. Iconic detail: GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER.
For glNamedFramebufferTextureLayer, framebuffer is the name of the framebuffer object. iykyk π
attachment specifies the logical attachment of the framebuffer and must be GL_COLOR_ATTACHMENTi, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT or GL_DEPTH_STENCIL_ATTACHMENT. i in GL_COLOR_ATTACHMENTi 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 and the GL_STENCIL_ATTACHMENT attachment points simultaneously. the way that's a two-for-one deal β¨
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. no cap.
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. math era. π§
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$$
$$ face = k \bmod 6. $$
π ERRORS π
GL_INVALID_ENUMis generated byglFramebufferTextureiftargetis not one of the accepted framebuffer targets.GL_INVALID_OPERATIONis generated byglFramebufferTextureif zero is bound totarget.GL_INVALID_OPERATIONis generated byglNamedFramebufferTextureifframebufferis not the name of an existing framebuffer object.GL_INVALID_ENUMis generated ifattachmentis not one of the accepted attachment points.GL_INVALID_OPERATIONis generated iftextureis not zero and is not the name of an existing three-dimensional, two-dimensional multisample array, one- or two-dimensional array, cube map, or cube map array texture.GL_INVALID_VALUEis generated iftextureis not zero andlevelis not a supported texture level fortexture, as described above.GL_INVALID_VALUEis generated iftextureis not zero andlayeris larger than the value ofGL_MAX_3D_TEXTURE_SIZEminus one (for three-dimensional texture objects), or larger than the value ofGL_MAX_ARRAY_TEXTURE_LAYERSminus one (for array texture objects).GL_INVALID_VALUEis generated iftextureis not zero andlayeris negative.GL_INVALID_OPERATIONis generated by iftextureis a buffer texture.
π VERSION SUPPORT π
OpenGL Version vibe check: 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5.
glFramebufferTextureLayer(Function/Feature Name) β2.0:-;2.1:-;3.0:β;3.1:β;3.2:β;3.3:β;4.0:β;4.1:β;4.2:β;4.3:β;4.4:β;4.5:β.glNamedFramebufferTextureLayerβ2.0:-;2.1:-;3.0:-;3.1:-;3.2:-;3.3:-;4.0:-;4.1:-;4.2:-;4.3:-;4.4:-;4.5:β.
π¦ SEE ALSO π¦
glGenFramebuffers()glBindFramebuffer()glGenRenderbuffers()glFramebufferTexture(),
π COPYRIGHT π
Copyright Β© 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT (again, bestie) π
Copyright Β© 2010-2014 Khronos Group
bye bestie π β source/version footer says [FIXME: source], date 08/09/2021, page GLFRAMEBUFFERTEXTURE(3G). slay.
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms