GLCHECKFRAMEBUFFERST(3G)
β¨ glCheckFramebufferStatus, glCheckNamedFramebufferStatus β the 3G girlies π
Okay bestie, welcome to the GLCHECKFRAMEBUFFERST(3G) page β yes the header line is literally still rocking a [FIXME: manual] placeholder, we love a work-in-progress era π. This is the one where you find out if your framebuffer is actually complete or just pretending. Let's get into it.
πΈ NAME
glCheckFramebufferStatus, glCheckNamedFramebufferStatus β check the completeness status of a framebuffer. That's it, that's the vibe check π
π¦ C SPECIFICATION
GLenum glCheckFramebufferStatus(GLenum target);
GLenum glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target);
Look at those signatures, so clean, so iconic β¨
π PARAMETERS
targetβ forglCheckFramebufferStatusthis is the target the framebuffer is bound to, and forglCheckNamedFramebufferStatusit's the target against which framebuffer completeness of framebuffer is checked. Yes it's doing double duty, she's versatile πframebufferβ the name of the framebuffer object, specifically forglCheckNamedFramebufferStatus. Bestie, this one's only for the named version, don't get it twisted π«Ά
π₯ DESCRIPTION
So glCheckFramebufferStatus and glCheckNamedFramebufferStatus return the completeness status of a framebuffer object β like, when it's being treated as a read framebuffer or a draw framebuffer, depending on what target is. It's giving "are you okay? do you need to talk?" energy π
For glCheckFramebufferStatus, the framebuffer being checked is whatever's bound to target, and target must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER, or GL_FRAMEBUFFER. And heads up: GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. Same thing, different font π
For glCheckNamedFramebufferStatus, framebuffer is zero or the name of the framebuffer object you wanna check. If framebuffer is zero, then you get the status of the default read or draw framebuffer, as determined by target. Default behavior, no notes π«
The return value is GL_FRAMEBUFFER_COMPLETE if the specified framebuffer is complete. Slay! Otherwise, the return value is determined as follows β no cap, this list is long but every single one matters:
GL_FRAMEBUFFER_UNDEFINEDis returned if the specified framebuffer is the default read or draw framebuffer, but the default framebuffer does not exist. She's not there, girl πGL_FRAMEBUFFER_INCOMPLETE_ATTACHMENTis returned if any of the framebuffer attachment points are framebuffer incomplete. One bad apple fr fr πGL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENTis returned if the framebuffer does not have at least one image attached to it. Literally empty, not a single image, we can't work with that πGL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFERis returned if the value ofGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPEisGL_NONEfor any color attachment point(s) named byGL_DRAW_BUFFERi. The draw buffer said "no β€οΈ" and it shows.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFERis returned ifGL_READ_BUFFERis notGL_NONEand the value ofGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPEisGL_NONEfor the color attachment point named byGL_READ_BUFFER. Same energy but for reading, iykyk πGL_FRAMEBUFFER_UNSUPPORTEDis returned if the combination of internal formats of the attached images violates an implementation-dependent set of restrictions. The formats just don't get along, it's not you it's the implementation β¨GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLEis returned if the value ofGL_RENDERBUFFER_SAMPLESis not the same for all attached renderbuffers; if the value ofGL_TEXTURE_SAMPLESis the not same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value ofGL_RENDERBUFFER_SAMPLESdoes not match the value ofGL_TEXTURE_SAMPLES. (Yes, "is the not same" β that's how the original says it, we're not fixing it, we're respecting it π)GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLEis also returned if the value ofGL_TEXTURE_FIXED_SAMPLE_LOCATIONSis not the same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value ofGL_TEXTURE_FIXED_SAMPLE_LOCATIONSis notGL_TRUEfor all attached textures. Two whole bullets for the same error code β she's thorough, we stan πGL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETSis returned if any framebuffer attachment is layered, and any populated attachment is not layered, or if all populated color attachments are not from textures of the same target. Mixed vibes = mixed layers, and that's a no π¦
And additionally, if an error occurs, zero is returned. That's your red flag that something went wrong, bestie π©
π ERRORS
GL_INVALID_ENUMis generated iftargetis notGL_DRAW_FRAMEBUFFER,GL_READ_FRAMEBUFFERorGL_FRAMEBUFFER. Wrong target, wrong energy, immediate error πGL_INVALID_OPERATIONis generated byglCheckNamedFramebufferStatusifframebufferis not zero or the name of an existing framebuffer object. You can't check a framebuffer that doesn't exist, the audacity π
π VERSION SUPPORT
Okay so the original puts this in a whole big table, and we're doing it in list form because honestly it reads better. Same facts, cuter delivery π
glCheckFramebufferStatus
- OpenGL
2.0β-(nope) - OpenGL
2.1β-(nope) - OpenGL
3.0ββ(yes bestie) - 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ββ
glCheckNamedFramebufferStatus
- 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ββ(literally the only one, main character energy β)
So the named version is a 4.5 exclusive β she arrived late and she arrived fashionably π
π SEE ALSO
Go check these out, they're the supporting cast π«Ά
glGenFramebuffers()glDeleteFramebuffers()glBindFramebuffer()
π 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 Β© 2010-2014 Khronos Group
(Yeah, the page has the COPYRIGHT section twice β iconic of it honestly, we're keeping both π)
That's the whole page, bestie! The footer on this one says [FIXME: source], dated 08/09/2021, and it's still filed under GLCHECKFRAMEBUFFERST(3G) β so like, go forth and check those framebuffers, and remember: if you get a zero back, that's not a status, that's an error, and you deserve better πΈβ¨π
π¦ 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