GLFLUSHMAPPEDBUFFERR(3G)
πΈ NAME πΈ
okay bestie, welcome to the 3G manual page for glFlushMappedBufferRange and glFlushMappedNamedBufferRange β the two functions that indicate modifications to a range of a mapped buffer. yes, that's the whole assignment π
β¨ C SPECIFICATION β¨
void glFlushMappedBufferRange(GLenum target, GLintptr offset,
GLsizeiptr length);
void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
GLsizeiptr length);
π PARAMETERS π
targetβ Specifies the target to which the buffer object is bound forglFlushMappedBufferRange, which must be one of the buffer binding targets in the following table: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β Specifies the name of the buffer object forglFlushMappedNamedBufferRange. yes, this is the named-buffer bestie πoffsetβ Specifies the start of the buffer subrange, in basic machine units.lengthβ Specifies the length of the buffer subrange, in basic machine units.
π« DESCRIPTION π«
okay so glFlushMappedBufferRange indicates that modifications have been made to a range of a mapped buffer object. The buffer object must previously have been mapped with the GL_MAP_FLUSH_EXPLICIT_BIT flag. no cap, that flag is literally required.
offset and length indicate the modified subrange of the mapping, in basic machine units. The specified subrange to flush is relative to the start of the currently mapped range of the buffer. These commands may be called multiple times to indicate distinct subranges of the mapping which require flushing. yes, you can hit it again and again for different subranges β it's giving efficient π
If a buffer range is mapped with both GL_MAP_PERSISTENT_BIT and GL_MAP_FLUSH_EXPLICIT_BIT set, then these commands may be called to ensure that data written by the client into the flushed region becomes visible to the server. Data written to a coherent store will always become visible to the server after an unspecified period of time. that last part is the "eventually, not instantly" vibe, iykyk π¦
π¦ NOTES π¦
- 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 π
bestie, these are the red flags π©
GL_INVALID_ENUMis generated byglFlushMappedBufferRangeiftargetis not one of the buffer binding targets listed above.GL_INVALID_OPERATIONis generated byglFlushMappedBufferRangeif zero is bound totarget.GL_INVALID_OPERATIONis generated byglFlushMappedNamedBufferRangeifbufferis not the name of an existing buffer object.GL_INVALID_VALUEis generated ifoffsetorlengthis negative, or ifoffset + lengthexceeds the size of the mapping.GL_INVALID_OPERATIONis generated if the buffer object is not mapped, or is mapped without theGL_MAP_FLUSH_EXPLICIT_BITflag.
π VERSION SUPPORT π
here's the vibe check across OpenGL versions, bestie β¨
2.0:glFlushMappedBufferRangeβ-;glFlushMappedNamedBufferRangeβ-2.1:glFlushMappedBufferRangeβ-;glFlushMappedNamedBufferRangeβ-3.0:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-3.1:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-3.2:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-3.3:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-4.0:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-4.1:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-4.2:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-4.3:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-4.4:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeβ-4.5:glFlushMappedBufferRangeββ;glFlushMappedNamedBufferRangeββ
π SEE ALSO π
glMapBufferRange()glMapBuffer()glUnmapBuffer()
π 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 (the sequel) π
Copyright Β© 2010-2014 Khronos Group
alright bestie, that's the page π
this was GLFLUSHMAPPEDBUFFERR(3G) from [FIXME: source], dated 08/09/2021. 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