GLGETFRAMEBUFFERPARA(3G)
okay bestie, welcome to a section 3G manual page (iykyk, it's the OpenGL corner of the internet β¨) and honestly? it's giving "tiny function, big feelings." we're querying framebuffer object parameters today and you're gonna slay it π
πΈ NAME πΈ
glGetFramebufferParameteriv, glGetNamedFramebufferParameteriv β query a named parameter of a framebuffer object π
β¨ C SPECIFICATION β¨
like, literally copy these exactly, no cap:
void glGetFramebufferParameteriv(GLenum target, GLenum pname,
GLint *params);
void glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname,
GLint *param);
π¦ PARAMETERS π¦
targetβ tells us which target the framebuffer object is bound to, forglGetFramebufferParameteriv. that's the whole vibe check.framebufferβ the name of the framebuffer object, forglGetNamedFramebufferParameteriv. yes bestie, you gotta name it.pnameβ the parameter of the framebuffer object you wanna query. pick your fighter πparamsβ where the value of parameterpnamefor the framebuffer object gets returned. it's the output slot, the little mailbox π¬
π DESCRIPTION π
glGetFramebufferParameteriv and glGetNamedFramebufferParameteriv query parameters of a specified framebuffer object. that's it, that's the whole job, and they ate π₯
so for glGetFramebufferParameteriv, the framebuffer object is the one bound to target, which must be one of GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER. and heads up: GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. default framebuffers may also be queried if bound to target. no gatekeeping π
for glGetNamedFramebufferParameteriv, framebuffer is the name of the framebuffer object. and if framebuffer is zero, the default draw framebuffer is queried. zero = the default one, noted π
upon successful return, param will contain the value of the framebuffer parameter specified by pname, as described below. (yes bestie, param here β the docs switch between param and params and honestly that's just the lore at this point π)
π the exclusive club: parameters that can ONLY be queried for framebuffer objects
GL_FRAMEBUFFER_DEFAULT_WIDTHβparamsreturns the value ofGL_FRAMEBUFFER_DEFAULT_WIDTHfor the framebuffer object.GL_FRAMEBUFFER_DEFAULT_HEIGHTβparamsreturns the value ofGL_FRAMEBUFFER_DEFAULT_HEIGHTfor the framebuffer object.GL_FRAMEBUFFER_DEFAULT_LAYERSβparamsreturns the value ofGL_FRAMEBUFFER_DEFAULT_LAYERSfor the framebuffer object.GL_FRAMEBUFFER_DEFAULT_SAMPLESβparamsreturns the value ofGL_FRAMEBUFFER_DEFAULT_SAMPLESfor the framebuffer object.GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONSβparamsreturns the boolean value ofGL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS.
π the everyone's-invited list: parameters you can query for BOTH default framebuffers and framebuffer objects
GL_DOUBLEBUFFERβparamreturns a boolean value indicating whether double buffering is supported for the framebuffer object.GL_IMPLEMENTATION_COLOR_READ_FORMATβparamreturns aGLenumvalue indicating the preferred pixel data format for the framebuffer object. seeglReadPixels().GL_IMPLEMENTATION_COLOR_READ_TYPEβparamreturns aGLenumvalue indicating the implementation's preferred pixel data type for the framebuffer object. seeglReadPixels().GL_SAMPLESβparamreturns an integer value indicating the coverage mask size for the framebuffer object. seeglSampleCoverage().GL_SAMPLE_BUFFERSβparamreturns an integer value indicating the number of sample buffers associated with the framebuffer object. seeglSampleCoverage().GL_STEREOβparamreturns a boolean value indicating whether stereo buffers (left and right) are supported for the framebuffer object.
π§ NOTES π§
okay so bestie, the version gatekeeping is real here, pls read π
queries of default framebuffers are supported only if the GL version is 4.5 or higher. otherwise, an GL_INVALID_OPERATION error is generated. like, literally, it will not happen for you. π
queries of the framebuffer-dependent parameters GL_DOUBLEBUFFER, GL_IMPLEMENTATION_COLOR_READ_FORMAT, GL_IMPLEMENTATION_COLOR_READ_TYPE, GL_SAMPLES, GL_SAMPLE_BUFFERS and GL_STEREO are supported only if the GL version is 4.5 or higher.
and the framebuffer-dependent state GL_SAMPLE_POSITION cannot be queried with these commands. nope. not these ones. not today. π«
π ERRORS π
GL_INVALID_ENUMis generated byglGetFramebufferParameteriviftargetis not one of the accepted framebuffer targets.GL_INVALID_OPERATIONis generated byglGetNamedFramebufferAttachmentParameterivifframebufferis not zero or the name of an existing framebuffer object.GL_INVALID_ENUMis generated ifpnameis not one of the accepted parameter names.GL_INVALID_OPERATIONis generated if a default framebuffer is queried, andpnameis not one ofGL_DOUBLEBUFFER,GL_IMPLEMENTATION_COLOR_READ_FORMAT,GL_IMPLEMENTATION_COLOR_READ_TYPE,GL_SAMPLES,GL_SAMPLE_BUFFERSorGL_STEREO.
π«Ά ASSOCIATED GETS π«Ά
glGetFramebufferAttachmentParameter()
β VERSION SUPPORT β
so the original is a big gorgeous table with an OpenGL Version header spanning columns 2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5, and rows labelled Function / Feature Name. here's that whole energy translated, no details missing π
glGetFramebufferParameterivβ-for 2.0,-for 2.1,-for 3.0,-for 3.1,-for 3.2,-for 3.3,-for 4.0,-for 4.1,-for 4.2,βfor 4.3,βfor 4.4,βfor 4.5glGetNamedFramebufferParameterivβ-for 2.0,-for 2.1,-for 3.0,-for 3.1,-for 3.2,-for 3.3,-for 4.0,-for 4.1,-for 4.2,-for 4.3,-for 4.4,βfor 4.5
π₯ SEE ALSO π₯
glFramebufferParameteri()glGetFramebufferAttachmentParameter()
π 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 on the page twice, we don't question the lore) π
Copyright Β© 2014 Khronos Group
and that's the whole page bestie π the footer energy is [FIXME: source] and the date 08/09/2021, so like... shoutout to whoever's still fixing that source tag, you're the main character π 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