GLGETRENDERBUFFERPAR(3G)

πŸ’… GLGETRENDERBUFFERPAR(3G) β€” the renderbuffer interrogation page

okay so bestie, this is a section 3G manpage (that's the GL family, iykyk) and it's literally all about asking a renderbuffer object nosy little questions. no cap. ✨


🌸 NAME 🌸

glGetRenderbufferParameteriv, glGetNamedRenderbufferParameteriv β€” query a named parameter of a renderbuffer object πŸŽ€


πŸ¦‹ C SPECIFICATION πŸ¦‹

void glGetRenderbufferParameteriv(GLenum target, GLenum pname,
                                  GLint *params);

void glGetNamedRenderbufferParameteriv(GLuint renderbuffer,
                                       GLenum pname, GLint *params);

πŸ’– PARAMETERS πŸ’–

  • target β€” tells us which target the renderbuffer object is bound to, for glGetRenderbufferParameteriv. and like, target must be GL_RENDERBUFFER. no exceptions, periodt.
  • renderbuffer β€” the name of the renderbuffer object, for glGetNamedRenderbufferParameteriv. this one's the "named" one, you see the pattern πŸ’…
  • pname β€” the parameter of the renderbuffer object you want to query. which question are we asking today, queen?
  • params β€” returns the value of parameter pname for the renderbuffer object. that's your answer slot right there 🫢

✨ DESCRIPTION ✨

glGetRenderbufferParameteriv and glGetNamedRenderbufferParameteriv query parameters of a specified renderbuffer object. that's the whole vibe. 🧚

for glGetRenderbufferParameteriv, the renderbuffer object is the one bound to target, which must be GL_RENDERBUFFER.

for glGetNamedRenderbufferParameteriv, renderbuffer is the name of the renderbuffer object.

upon successful return, param will contain the value of the renderbuffer parameter specified by pname, as described below. πŸ‘‡

  • GL_RENDERBUFFER_WIDTH, GL_RENDERBUFFER_HEIGHT, GL_RENDERBUFFER_INTERNAL_FORMAT or GL_RENDERBUFFER_SAMPLES β€” params returns the width in pixels, the height in pixels, internal format, or the number of samples, respectively, of the image of the specified renderbuffer object. so like. size, format, samples. iconic info dump πŸ’…
  • GL_RENDERBUFFER_RED_SIZE, GL_RENDERBUFFER_GREEN_SIZE, GL_RENDERBUFFER_BLUE_SIZE, GL_RENDERBUFFER_ALPHA_SIZE, GL_RENDERBUFFER_DEPTH_SIZE or GL_RENDERBUFFER_STENCIL_SIZE β€” params returns the actual resolution in bits (not the resolution specified when the image was defined) for the red, green, blue, alpha, depth or stencil components, respectively, of the image of the renderbuffer object. read that again bestie: actual, not what you asked for when you defined it. the truth, not the dream 😭

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated by glGetRenderbufferParameteriv if target is not GL_RENDERBUFFER. wrong target, bestie.
  • GL_INVALID_OPERATION is generated by glGetRenderbufferParameteriv if zero is bound to target. nothing's bound, so there's nothing to interrogate πŸ™ˆ
  • GL_INVALID_OPERATION is generated by glGetNamedRenderbufferParameteriv if renderbuffer is not the name of an existing renderbuffer object. ghost name. doesn't exist. girl where πŸ«₯
  • GL_INVALID_ENUM is generated if pname is not one of the accepted parameter names described above. you made up a question, and the GL did not care for it πŸ’€

πŸ‘‘ VERSION SUPPORT πŸ‘‘

here's the whole grid, laid out for you, no table needed:

  • glGetNamedRenderbufferParameteriv β€” - 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, and βœ” for 4.5. so basically: 4.5 only. late bloomer, main character energy ✨
  • glGetRenderbufferParameteriv β€” - 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, and βœ” for 4.5. been here since 3.0 and never left. ate. πŸ”₯

(the column headers in the original are just "OpenGL Version" over 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 the row headers are "Function / Feature Name" β€” that's the whole structure, you're not missing anything πŸŽ€)


πŸ“ SEE ALSO πŸ“

  • glGenRenderbuffers()
  • glFramebufferRenderbuffer()
  • glBindRenderbuffer()
  • glRenderbufferStorage()
  • glRenderbufferStorageMultisample()

go read those next, bestie, they're the whole friend group 🫢


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


lowkey important: the source line on this one is literally [FIXME: source] and the date is 08/09/2021 β€” yes, the manpage itself is wearing a "FIXME" sticker, and honestly? relatable. πŸ’…

k that's the page, love u, go query some renderbuffers, mwah πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from