#include
<oglplus/dsa/buffer_map.hpp>
The DSABufferRawMap
allows to map the contents of a
GPU buffer into the client's address space.
#if GL_VERSION_4_5 || GL_ARB_direct_state_access class DSABufferRawMap { public: DSABufferRawMap( BufferName buffer, BufferSize offset, BufferSize size, Bitfield<BufferMapAccess> access ); DSABufferRawMap( BufferName buffer, Bitfield<BufferMapAccess> access ); DSABufferRawMap(const DSABufferRawMap&) = delete; DSABufferRawMap(DSABufferRawMap&&); ~DSABufferRawMap(void); void Unmap(void); bool Mapped(void) const; GLsizeiptr Size(void) const; const GLvoid* RawData(void) const; GLvoid* RawData(void); void FlushRange(BufferSize offset, BufferSize length); };
Maps a range (specified by |
|
Maps the whole specified buffer with the specified |
|
DSABuffer maps are not copyable. |
|
DSABuffer maps are moveable. |
|
Unmaps the buffer from client address space (if mapped). See |
|
Returns true if the buffer is mapped. |
|
Returns the size (in bytes) of the mapped buffer. |
|
Returns a raw pointer to the mapped data. Note that the buffer has to be mapped or the result is undefined. |
|
Indicate modifications to a mapped buffer range. Note that the buffer
has to be mapped or the result is undefined. See |
template <typename Type> class DSABufferTypedMap : public DSABufferRawMap { public: DSABufferTypedMap( BufferName buffer, BufferTypedSize<Type> offset, BufferTypedSize<Type> size, Bitfield<BufferMapAccess> access ) DSABufferTypedMap( BufferName buffer, Bitfield<BufferMapAccess> access ); GLsizeiptr Count(void) const; const Type* Data(void) const; Type* Data(void); const Type& At(GLuint index) const; Type& At(GLuint index); void FlushElements( BufferTypedSize<Type> start, BufferTypedSize<Type> count ); }; #endif // GL_VERSION_4_5 || GL_ARB_direct_state_access
Maps a range (specified by |
|
Maps the whole specified buffer with the specified |
|
Returns the count of elements of |
|
Returns a typed pointer to the mapped data. Note that the buffer has to be mapped or the result is undefined. |
|
Returns a reference to the element at the specified |
|
Indicate modifications to a mapped range of elements of |