GLRENDERBUFFERSTORAG(3G)
π GLRENDERBUFFERSTORAG(3G) β bestie edition
ok so first things first: this is a page from the 3G manual section (yep, the OpenGL one), and the header even has a lil [FIXME: manual] placeholder in it, which, honestly? iconic messy. anyways, buckle up π
β¨ NAME β¨
glRenderbufferStorage, glNamedRenderbufferStorage β establish data storage, format and dimensions of a renderbuffer object's image πΌοΈ
like literally, these two functions set up the actual storage for a renderbuffer's image, plus its format and its dimensions. that's the whole vibe.
π§Ύ C SPECIFICATION π§Ύ
no cap, here's the exact signatures, character for character:
void glRenderbufferStorage(GLenum target, GLenum internalformat,
GLsizei width, GLsizei height);
void glNamedRenderbufferStorage(GLuint renderbuffer,
GLenum internalformat, GLsizei width,
GLsizei height);
πΈ PARAMETERS πΈ
targetβ specifies a binding target of the allocation for theglRenderbufferStoragefunction. must beGL_RENDERBUFFER. that's it, that's the only valid answer bestie πrenderbufferβ specifies the name of the renderbuffer object for theglNamedRenderbufferStoragefunction. πinternalformatβ specifies the internal format to use for the renderbuffer object's image.widthβ specifies the width of the renderbuffer, in pixels. πheightβ specifies the height of the renderbuffer, in pixels. π
π¦ DESCRIPTION π¦
ok so the tea β: glRenderbufferStorage is equivalent to calling glRenderbufferStorageMultisample() with the samples set to zero. and glNamedRenderbufferStorage is equivalent to calling glNamedRenderbufferStorageMultisample with the samples set to zero. so like, the multisample versions but with zero samples. slay, but make it single-sample β¨
for glRenderbufferStorage, the target of the operation, specified by target, must be GL_RENDERBUFFER. for glNamedRenderbufferStorage, renderbuffer must be a name of an existing renderbuffer object β like, it has to actually exist, no imaginary friends π
internalformat specifies the internal format to be used for the renderbuffer object's storage, and it must be a color-renderable, depth-renderable, or stencil-renderable format. width and height are the dimensions, in pixels, of the renderbuffer. both width and height must be less than or equal to the value of GL_MAX_RENDERBUFFER_SIZE. respectfully, do not test this π«Ά
upon success, glRenderbufferStorage and glNamedRenderbufferStorage delete any existing data store for the renderbuffer image, and the contents of the data store after calling glRenderbufferStorage are undefined. so yeah β the old data is gone gone, and what's in there after? nobody knows. mystery era π
π ERRORS π
here's where it gets real, bestie. these are the ways your call can fail:
GL_INVALID_ENUMis generated byglRenderbufferStorageiftargetis notGL_RENDERBUFFER.GL_INVALID_OPERATIONis generated byglNamedRenderbufferStorageifrenderbufferis not the name of an existing renderbuffer object.GL_INVALID_VALUEis generated if either ofwidthorheightis negative, or greater than the value ofGL_MAX_RENDERBUFFER_SIZE. (negative pixels?? be so fr π)GL_INVALID_ENUMis generated ifinternalformatis not a color-renderable, depth-renderable, or stencil-renderable format.GL_OUT_OF_MEMORYis generated if the GL is unable to create a data store of the requested size.
π VERSION SUPPORT π
the original has this in a big grid β Function/Feature Name down the side, OpenGL Version 2.0 through 4.5 across the top β but grids are ugly in a terminal so here's the same info, gorgeous and readable π
glNamedRenderbufferStorage
2.0β-2.1β-3.0β-3.1β-3.2β-3.3β-4.0β-4.1β-4.2β-4.3β-4.4β-4.5β β
like, it's a 4.5 only babe. it simply did not exist before then π
glRenderbufferStorage
2.0β-2.1β-3.0β β3.1β β3.2β β3.3β β4.0β β4.1β β4.2β β4.3β β4.4β β4.5β β
from 3.0 onward, it ate and left no crumbs π₯
π SEE ALSO π
go read these next, iykyk:
glGenRenderbuffers()glBindRenderbuffer()glNamedRenderbufferStorageMultisampleglRenderbufferStorageMultisample()glFramebufferRenderbuffer()glDeleteRenderbuffers()
Β©οΈ 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/.
and again, because the page says it twice and i keep every detail, periodt:
Copyright Β© 2010-2014 Khronos Group
mwah π that's the page!! the footer says [FIXME: source] and dates it 08/09/2021, and it's the GLRENDERBUFFERSTORAG(3G) page from your 3G manual. go forth and allocate responsibly, bestie π«Άβ¨
π¦ 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