GLAPI/glFlushMappedBufferRange: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
4.0 API.
 
m Bot: Adding better formatting.
 
(8 intermediate revisions by 2 users not shown)
Line 8: Line 8:
== Function Definition ==
== Function Definition ==


   GLsync '''glFlushMappedBufferRange'''(GLenum ''target'', GLintptr ''offset'', GLsizeiptr ''length'');
   void '''glFlushMappedBufferRange'''(GLenum {{param|target}}, GLintptr {{param|offset}}, GLsizeiptr {{param|length}});


; target
{{glapi buffertargets}}
: Specifies the target of the flush operation. ''target'' must be {{code|GL_ARRAY_BUFFER}}, {{code|GL_COPY_READ_BUFFER}}, {{code|GL_COPY_WRITE_BUFFER}}, {{code|GL_ELEMENT_ARRAY_BUFFER}}, {{code|GL_PIXEL_PACK_BUFFER}}, {{code|GL_PIXEL_UNPACK_BUFFER}}, {{code|GL_TEXTURE_BUFFER}}, {{code|GL_TRANSFORM_FEEDBACK_BUFFER}}, or {{code|GL_UNIFORM_BUFFER}}.
; offset
; offset
: Specifies the start of the buffer subrange, in basic machine units.
: Specifies the start of the buffer subrange, in basic machine units.
Line 19: Line 18:
== Description ==
== Description ==


'''glFlushMappedBufferRange''' indicates that modifications have been made to a range of a mapped buffer. The buffer must previously have been mapped with the {{code|GL_MAP_FLUSH_EXPLICIT}} flag. ''offset'' and ''length'' indicate the modified subrange of the mapping, in basic units. The specified subrange to flush is relative to the start of the currently mapped range of the buffer. '''glFlushMappedBufferRange''' may be called multiple times to indicate distinct subranges of the mapping which require flushing.
'''glFlushMappedBufferRange''' indicates that modifications have been made to a range of a mapped buffer. The buffer must previously have been mapped with the {{enum|GL_MAP_FLUSH_EXPLICIT_BIT}} flag. {{param|offset}} and {{param|length}} indicate the modified subrange of the mapping, in basic units. The specified subrange to flush is relative to the start of the currently mapped range of the buffer. '''glFlushMappedBufferRange''' may be called multiple times to indicate distinct subranges of the mapping which require flushing.
 
== Notes ==
 
The {{enum|GL_DISPATCH_INDIRECT_BUFFER}} and {{enum|GL_SHADER_STORAGE_BUFFER}} targets are available only if the GL version is 4.3 or greater.
 
The {{enum|GL_QUERY_BUFFER}} target is available only if the GL version is 4.4 or greater.


== Errors ==
== Errors ==


{{code|GL_INVALID_VALUE}} is generated if ''offset'' or ''length'' is negative, or if ''offset'' + ''length'' exceeds the size of the mapping.
{{enum|GL_INVALID_VALUE}} is generated if {{param|offset}} or {{param|length}} is negative, or if {{param|offset}} + {{param|length}} exceeds the size of the mapping.


{{code|GL_INVALID_OPERATION}} is generated if zero is bound to ''target''.
{{enum|GL_INVALID_OPERATION}} is generated if zero is bound to {{param|target}}.


{{code|GL_INVALID_OPERATION}} is generated if the buffer bound to ''target'' is not mapped, or is mapped without the {{code|GL_MAP_FLUSH_EXPLICIT}} flag.
{{enum|GL_INVALID_OPERATION}} is generated if the buffer bound to {{param|target}} is not mapped, or is mapped without the {{enum|GL_MAP_FLUSH_EXPLICIT_BIT}} flag.


== See Also ==
== See Also ==


[[GLAPI/glMapBufferRange|glMapBufferRange]], [[GLAPI/glMapBuffer|glMapBuffer]], [[GLAPI/glUnmapBuffer|glUnmapBuffer]]
{{apifunc|glBindBuffer}}, {{apifunc|glMapBufferRange}}, {{apifunc|glMapBuffer}}, {{apifunc|glUnmapBuffer}}


== Copyright ==
== Copyright ==
Line 37: Line 42:
Copyright © 2010 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/ http://opencontent.org/openpub/].
Copyright © 2010 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/ http://opencontent.org/openpub/].


[[Category:API Reference 4|FlushMappedBufferRange]]
[[Category:Core API Ref Buffer Objects|FlushMappedBufferRange]]
[[Category:Core API Reference|FlushMappedBufferRange]]
[[Category:Buffer Object API State Functions|FlushMappedBufferRange]]

Latest revision as of 09:57, 15 August 2013

glFlushMappedBufferRange
Core in version 4.6
Core since version 3.0

glFlushMappedBufferRange: indicate modifications to a range of a mapped buffer

Function Definition

 void glFlushMappedBufferRange(GLenum target​, GLintptr offset​, GLsizeiptr length​);
target
Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER, GL_ATOMIC_COUNTER_BUFFER, GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, GL_DRAW_INDIRECT_BUFFER, GL_DISPATCH_INDIRECT_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER, GL_QUERY_BUFFER, GL_SHADER_STORAGE_BUFFER, GL_TEXTURE_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, or GL_UNIFORM_BUFFER.
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. The buffer 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 units. The specified subrange to flush is relative to the start of the currently mapped range of the buffer. glFlushMappedBufferRange may be called multiple times to indicate distinct subranges of the mapping which require flushing.

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_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 zero is bound to target​.

GL_INVALID_OPERATION is generated if the buffer bound to target​ is not mapped, or is mapped without the GL_MAP_FLUSH_EXPLICIT_BIT flag.

See Also

glBindBuffer, glMapBufferRange, glMapBuffer, glUnmapBuffer

Copyright

Copyright © 2010 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/.