GLINVALIDATESUBFRAME(3G)
π
GLINVALIDATESUBFRAME β the 3G manual page, bestie edition β¨
Okay so like, this is the 3G manual page and it's about throwing away chunks of your framebuffer like it's last season's fit. No cap, it's giving "selective memory loss, but for pixels" π«Ά
β¨ NAME β¨
glInvalidateSubFramebuffer, glInvalidateNamedFramebufferSubData β invalidate the content of a region of some or all of a framebuffer's attachments π«
π C SPECIFICATION π
Like, here's literally the exact signatures, don't @ me:
void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
const GLenum * attachments, GLint x,
GLint y, GLint width, GLint height);
void glInvalidateNamedFramebufferSubData(GLuint framebuffer,
GLsizei numAttachments,
const GLenum *attachments,
GLint x, GLint y,
GLsizei width, GLsizei height);
πΈ PARAMETERS πΈ
targetβ the target the framebuffer object is attached to, forglInvalidateSubFramebuffer. iykyk π―framebufferβ the name of the framebuffer object, forglInvalidateNamedFramebufferSubData. it's giving "which one, bestie?" πnumAttachmentsβ how many entries are in theattachmentsarray. count 'em πattachmentsβ a pointer to an array identifying the attachments to be invalidated. the hit list πxβ the X offset of the region to be invalidated πyβ the Y offset of the region to be invalidated πwidthβ the width of the region to be invalidated πheightβ the height of the region to be invalidated π
π¦ DESCRIPTION π¦
So glInvalidateSubFramebuffer and glInvalidateNamedFramebufferSubData invalidate the contents of a specified region of a specified set of attachments of a framebuffer. Basically: "this part? don't care. bin it." π
For glInvalidateSubFramebuffer, the framebuffer object is the one bound to target, and target must be one of GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_DRAW_FRAMEBUFFER. Heads up: GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. Default framebuffers may also be invalidated if bound to target β¨
For glInvalidateNamedFramebufferSubData, framebuffer is the name of the framebuffer object. If framebuffer is zero, the default draw framebuffer is affected. zero = "do the default one, babe" π
The set of attachments of which a region is to be invalidated is specified in the attachments array, which contains numAttachments elements π
If the specified framebuffer is a framebuffer object, each element of attachments must be one of GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT GL_DEPTH_STENCIL_ATTACHMENT, or GL_COLOR_ATTACHMENTi, where i is between zero and the value of GL_MAX_FRAMEBUFFER_ATTACHMENTS minus one. (Yeah, we noticed the missing comma in the original too. copying it exactly, periodt π
)
If the specified framebuffer is a default framebuffer, each element of attachments must be one of GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_AUXi, GL_ACCUM, GL_COLOR, GL_DEPTH, or GL_STENCIL. GL_COLOR is treated as GL_BACK_LEFT for a double-buffered context and GL_FRONT_LEFT for a single-buffered context. The other attachments identify the corresponding specific buffer. like, they know exactly which one they are πββοΈ
The contents of the specified region of each specified attachment become undefined after execution of glInvalidateSubFramebuffer or glInvalidateNamedFramebufferSubData π Undefined, bestie. The region to be invalidated is specified by x, y, width and height where x and y give the offset from the origin (with lower-left corner at $(0,0)$) and width and height are the width and height, respectively, of the region. Any pixels lying outside of the window allocated to the current GL context (for the default framebuffer), or outside of the attachments of the framebuffer object, are ignored β they're not on the guest list, so they're not getting invalidated π«β¨ If the framebuffer object is not complete, these commands may be ignored.
If the framebuffer object is not complete, glInvalidateSubFramebuffer and glInvalidateNamedFramebufferSubData may be ignored. This is not an error. no thoughts, head empty, no error π
π ERRORS π
GL_INVALID_ENUMbyglInvalidateSubFramebufferiftargetis not one of the accepted framebuffer targets π€GL_INVALID_OPERATIONbyglInvalidateNamedFramebufferSubDataifframebufferis not zero of the name of an existing framebuffer objectGL_INVALID_VALUEis generated ifnumAttachments,widthorheightis negative. no negative vibes allowed π«GL_INVALID_ENUMis generated if any element ofattachmentsis not one of the accepted framebuffer attachment points, as described aboveGL_INVALID_OPERATIONis generated if element ofattachmentsisGL_COLOR_ATTACHMENTmwhere m is greater than or equal to the value ofGL_MAX_COLOR_ATTACHMENTS. m said "I'm too iconic for this" π
β ASSOCIATED GETS β
glGet() with argument GL_MAX_COLOR_ATTACHMENTS. that's the one, that's the vibe check π₯
π VERSION SUPPORT π
So the original ships a whole grid here, and I'm not about to lose a single cell of it β here's every version, every yes/no, intact π«Ά
glInvalidateNamedFramebufferSubData
- OpenGL 2.0 β
- - OpenGL 2.1 β
- - OpenGL 3.0 β
- - OpenGL 3.1 β
- - OpenGL 3.2 β
- - OpenGL 3.3 β
- - OpenGL 4.0 β
- - OpenGL 4.1 β
- - OpenGL 4.2 β
- - OpenGL 4.3 β
- - OpenGL 4.4 β
- - OpenGL 4.5 β
β
glInvalidateSubFramebuffer
- OpenGL 2.0 β
- - OpenGL 2.1 β
- - OpenGL 3.0 β
- - OpenGL 3.1 β
- - OpenGL 3.2 β
- - OpenGL 3.3 β
- - OpenGL 4.0 β
- - OpenGL 4.1 β
- - OpenGL 4.2 β
- - OpenGL 4.3 β
β - OpenGL 4.4 β
β - OpenGL 4.5 β
β
π SEE ALSO π
Go read these next, they're all in the same friend group, fr fr:
glInvalidateTexSubImage()glInvalidateTexImage()glInvalidateBufferSubData()glInvalidateBufferData()glInvalidateFramebuffer()
πΈ COPYRIGHT πΈ
Copyright Β© 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 (yes, again, it's listed twice, I don't make the rules) πΈ
Copyright Β© 2014 Khronos Group
okay that's the whole thing, nothing skipped, nothing dropped, every flag and every version cell accounted for. you're welcome, bestie π β¨
And the cute sign-off: this page comes from [FIXME: source], dated 08/09/2021, and it's the GLINVALIDATESUBFRAME(3G) girlies' official paperwork. mwah ππ
π¦ 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