GLGETBUFFERPARAMETER(3G)
π NAME π
okay so this is the GLGETBUFFERPARAMETER page from manual section 3G β and yes, the header has [FIXME: manual] just chilling there, we are honoring the chaos. The function squad is:
glGetBufferParameterivglGetBufferParameteri64vglGetNamedBufferParameterivglGetNamedBufferParameteri64v
and their whole collective job is: return parameters of a buffer object. periodt. π
β¨ C SPECIFICATION β¨
okay bestie, here are the exact signatures, no cap:
void glGetBufferParameteriv(GLenum target, GLenum value, GLint * data);
void glGetBufferParameteri64v(GLenum target, GLenum value,
GLint64 * data);
void glGetNamedBufferParameteriv(GLuint buffer, GLenum pname,
GLint *params);
void glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname,
GLint64 *params);
π PARAMETERS π
targetβ this is where you point forglGetBufferParameterivandglGetBufferParameteri64v. It has to be one of the buffer binding targets in this list:GL_ARRAY_BUFFERβ Vertex attributesGL_ATOMIC_COUNTER_BUFFERβ Atomic counter storageGL_COPY_READ_BUFFERβ Buffer copy sourceGL_COPY_WRITE_BUFFERβ Buffer copy destinationGL_DISPATCH_INDIRECT_BUFFERβ Indirect compute dispatch commandsGL_DRAW_INDIRECT_BUFFERβ Indirect command argumentsGL_ELEMENT_ARRAY_BUFFERβ Vertex array indicesGL_PIXEL_PACK_BUFFERβ Pixel read targetGL_PIXEL_UNPACK_BUFFERβ Texture data sourceGL_QUERY_BUFFERβ Query result bufferGL_SHADER_STORAGE_BUFFERβ Read-write storage for shadersGL_TEXTURE_BUFFERβ Texture data bufferGL_TRANSFORM_FEEDBACK_BUFFERβ Transform feedback bufferGL_UNIFORM_BUFFERβ Uniform block storage
bufferβ the name of the buffer object forglGetNamedBufferParameterivandglGetNamedBufferParameteri64v. lowkey the named-function bestie.valueβ the name of the buffer object parameter to query.dataβ where the requested parameter gets returned. π«Ά
π DESCRIPTION π
These functions return in data a selected parameter of the specified buffer object. Like, you ask, they hand it over.
Tiny heads-up: PARAMETERS called this value, and right here the page says pname β both names are staying because that is literally what the page says. π
pname names a specific buffer object parameter, and here is the whole menu:
GL_BUFFER_ACCESSβparamsreturns the access policy set while mapping the buffer object β the value of the access parameter enum passed toglMapBuffer. If the buffer was mapped withglMapBufferRange, the access policy is determined by translating the bits in that access parameter to one of the supported enums forglMapBuffer, as described in the OpenGL Specification.GL_BUFFER_ACCESS_FLAGSβparamsreturns the access policy set while mapping the buffer object β the value of the access parameter bitfield passed toglMapBufferRange. If the buffer was mapped withglMapBuffer, the access policy is determined by translating the enums in that access parameter to the corresponding bits forglMapBufferRange, as described in the OpenGL Specification. The initial value is zero.GL_BUFFER_IMMUTABLE_STORAGEβparamsreturns a boolean flag indicating whether the buffer object is immutable. The initial value isGL_FALSE.GL_BUFFER_MAPPEDβparamsreturns a flag indicating whether the buffer object is currently mapped. The initial value isGL_FALSE.GL_BUFFER_MAP_LENGTHβparamsreturns the length of the mapping into the buffer object established withglMapBuffer*. Thei64vversions of these queries should be used for this parameter. The initial value is zero.GL_BUFFER_MAP_OFFSETβparamsreturns the offset of the mapping into the buffer object established withglMapBuffer*. Thei64vversions of these queries should be used for this parameter. The initial value is zero.GL_BUFFER_SIZEβparamsreturns the size of the buffer object, measured in bytes. The initial value is 0.GL_BUFFER_STORAGE_FLAGSβparamsreturns a bitfield indicating the storage flags for the buffer object. If the buffer object is immutable, the value returned will be that specified when the data store was established withglBufferStorage. If the data store was established withglBufferData, the value will beGL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_DYNAMIC_STORAGE_BIT | GL_MAP_WRITE_BITβ yes,GL_MAP_WRITE_BITreally shows up twice in that expression, and we are not editing it. The initial value is zero.GL_BUFFER_USAGEβparamsreturns the buffer object's usage pattern. The initial value isGL_STATIC_DRAW.
πΈ NOTES πΈ
- If an error is generated, no change is made to the contents of
data. fr fr. - The
GL_ATOMIC_COUNTER_BUFFERtarget is available only if the GL version is 4.2 or greater. - The
GL_DISPATCH_INDIRECT_BUFFERandGL_SHADER_STORAGE_BUFFERtargets are available only if the GL version is 4.3 or greater. - The
GL_QUERY_BUFFERtarget is available only if the GL version is 4.4 or greater.
π₯ ERRORS π₯
GL_INVALID_ENUMis generated byglGetBufferParameter*iftargetis not one of the accepted buffer targets.GL_INVALID_OPERATIONis generated byglGetBufferParameter*if zero is bound totarget.GL_INVALID_OPERATIONis generated byglGetNamedBufferParameter*ifbufferis not the name of an existing buffer object.GL_INVALID_ENUMis generated ifpnameis not one of the buffer object parameter names described above.
β¨ VERSION SUPPORT β¨
okay bestie, this is the OpenGL Version vibe check for every Function / Feature Name, fr fr. β means itβs in that version, and - means itβs a no-show there. No cap, every single cell is accounted for:
glGetBufferParameteri64vβ2.0-,2.1-,3.0-,3.1-,3.2β,3.3β,4.0β,4.1β,4.2β,4.3β,4.4β,4.5β.glGetBufferParameterivβ2.0β,2.1β,3.0β,3.1β,3.2β,3.3β,4.0β,4.1β,4.2β,4.3β,4.4β,4.5β. literally all of them, periodt πglGetNamedBufferParameteri64vβ2.0-,2.1-,3.0-,3.1-,3.2-,3.3-,4.0-,4.1-,4.2-,4.3-,4.4-,4.5β.glGetNamedBufferParameterivβ2.0-,2.1-,3.0-,3.1-,3.2-,3.3-,4.0-,4.1-,4.2-,4.3-,4.4-,4.5β.
πΈ SEE ALSO πΈ
bestie, go peek at these too, theyβre all part of the same friend group π«Ά
glBindBuffer()glBufferData()glGetBufferPointerv()glMapBuffer()glUnmapBuffer()
π COPYRIGHT π
legal bestie moment, keeping it exact:
- Copyright Β© 2005 Addison-Wesley.
- 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 π
and hereβs the second COPYRIGHT block, because the page said so π
- Copyright Β© 2005 Sams Publishing
- Copyright Β© 2010-2014 Khronos Group
okay thatβs the whole page, bestie π
β¨ source: [FIXME: source], version: GLGETBUFFERPARAMETER(3G), date: 08/09/2021. go be iconic with your buffers π«Άπ
π¦ 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