glFlushMappedBufferRange.3G - Man Page

indicate modifications to a range of a mapped buffer

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 for glFlushMappedBufferRange, which must be one of the buffer binding targets in the following table:

Buffer Binding TargetPurpose
GL_ARRAY_BUFFERVertex attributes
GL_ATOMIC_COUNTER_BUFFERAtomic counter storage
GL_COPY_READ_BUFFERBuffer copy source
GL_COPY_WRITE_BUFFERBuffer copy destination
GL_DISPATCH_INDIRECT_BUFFERIndirect compute dispatch commands
GL_DRAW_INDIRECT_BUFFERIndirect command arguments
GL_ELEMENT_ARRAY_BUFFERVertex array indices
GL_PIXEL_PACK_BUFFERPixel read target
GL_PIXEL_UNPACK_BUFFERTexture data source
GL_QUERY_BUFFERQuery result buffer
GL_SHADER_STORAGE_BUFFERRead-write storage for shaders
GL_TEXTURE_BUFFERTexture data buffer
GL_TRANSFORM_FEEDBACK_BUFFERTransform feedback buffer
GL_UNIFORM_BUFFERUniform block storage
buffer

Specifies the name of the buffer object for glFlushMappedNamedBufferRange.

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

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.

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.

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.

Notes

The GL_DISPATCH_INDIRECT_BUFFER and GL_SHADER_STORAGE_BUFFER targets are available only if the GL version is 4.3 or greater.

The GL_QUERY_BUFFER target is available only if the GL version is 4.4 or greater.

Errors

GL_INVALID_ENUM is generated by glFlushMappedBufferRange if target is not one of the buffer binding targets listed above.

GL_INVALID_OPERATION is generated by glFlushMappedBufferRange if zero is bound to target.

GL_INVALID_OPERATION is generated by glFlushMappedNamedBufferRange if buffer is not the name of an existing buffer object.

GL_INVALID_VALUE is generated if offset or length is negative, or if offset + length exceeds the size of the mapping.

GL_INVALID_OPERATION is generated if the buffer object is not mapped, or is mapped without the GL_MAP_FLUSH_EXPLICIT_BIT flag.

Version Support

OpenGL Version
Function / Feature Name2.02.13.03.13.23.34.04.14.24.34.44.5
glFlushMappedBufferRange--
glFlushMappedNamedBufferRange-----------

See Also

glMapBufferRange(), glMapBuffer(), glUnmapBuffer()

Referenced By

glMapBufferRange.3G(3), glMemoryBarrier.3G(3).

The man page glFlushMappedNamedBufferRange.3G(3) is an alias of glFlushMappedBufferRange.3G(3).

01/24/2024