#include
<oglplus/dsa/buffer.hpp>
#if GL_VERSION_4_5 || GL_ARB_direct_state_access template <> class ObjectOps<tag::DirectState, tag::Buffer> : public ObjZeroOps<tag::DirectState, tag::Buffer>{ public: struct Property { typedef BufferUsage Usage; typedef BufferMapAccess MapAccess; }; typedef DSABufferTypedMap<GLubyte> Map;
Boolean Mapped(void) const;
void Resize( BufferSize size, BufferUsage usage = BufferUsage::StaticDraw ) const;
void RawData( BufferSize size, const GLvoid* data, BufferUsage usage = BufferUsage::StaticDraw ) const;
void Data( const BufferData& data, BufferUsage usage = BufferUsage::StaticDraw ) const;
template <typename GLtype> void Data( SizeType count, const GLtype* data, BufferUsage usage = BufferUsage::StaticDraw ) const; void SubData( BufferSize offset, const BufferData& data ) const;
template <typename GLtype> static void SubData( BufferSize offset, SizeType count, const GLtype* data ); static void CopySubData( BufferName readbuffer, BufferName writebuffer, BufferSize readoffset, BufferSize writeoffset, BufferSize size );
template <typename GLtype> void ClearData( PixelDataInternalFormat internal_format, PixelDataFormat format, const GLtype* value ) const;
template <typename GLtype> void ClearSubData( BufferTarget target, PixelDataInternalFormat internal_format, BufferSize offset, BufferSize size, PixelDataFormat format, const GLtype* value ) const;
void Storage( const BufferData& data, Bitfield<BufferStorageBit> flags ) const;
void Storage( BufferSize size, const void* data, Bitfield<BufferStorageBit> flags ) const;
Indirectly inherits from ObjCommonOps<tag::Buffer>. |
|
Mapping of the buffer to the client address space. |
|
Returns true if |
|
Allocates or reallocates storage of |
|
Uploads |
|
Uploads the specified |
|
Uploads the specified |
|
Copies a block of data of the specified |
|
Clears |
|
Clears a sub-range (specified by |
|
Creates a data store for |
SizeType Size(void) const;BufferUsage Usage(void) const;
Bitfield<BufferMapAccess> Access(void) const;
#if GL_NV_shader_buffer_load void MakeResident(AccessSpecifier access);
void MakeNonResident(void);
BufferGPUAddress GPUAddress(void) const;
#endif };
Returns the size of |
|
Returns the usage hint of |
|
Returns the access bits of |
|
Makes |
|
Makes |
|
Returns the GPU address of |
typedef ObjectOps<tag::DirectState, tag::Buffer> DSABufferOps; typedef Object<DSABufferOps> DSABuffer;
struct DSABufferOpsAndUsage { };DSABufferOpsAndUsage operator << ( DSABufferOps& buffer, BufferUsage usage );
struct DSABufferOpsAndIdxTgt { };
DSABufferOpsAndIdxTgt operator << ( DSABufferOps& buffer, BufferIndexedTarget target );
struct DSABufferOpsAndOffset { };
DSABufferOpsAndOffset operator + ( DSABufferOps& buffer, BufferSize offset );
const DSABufferOps& operator << ( DSABufferOps& buffer, BufferTarget target );
DSABufferOps& operator << ( const DSABufferOpsAndIdxTgt& bat, GLuint index );
DSABufferOps& operator << ( DSABufferOps& buffer, const BufferData& data );
DSABufferOps& operator << ( BufferTargetAndUsage&& tau, const BufferData& data );
DSABufferOps& operator << ( BufferTargetAndOffset&& tao, const BufferData& data );
#endif // GL_VERSION_4_5 || GL_ARB_direct_state_access
Helper class for syntax sugar operators. Binds together the buffer name and usage hint. |
|
Ties together a |
|
Helper class for syntax sugar operators. Binds together a reference to a buffer and an indexed target. |
|
Ties together a reference to a |
|
Helper class for syntax sugar operators. Binds together a buffer target and offset value. |
|
Ties together a |
|
Equivalent to |
|
Equivalent to |
|
Equivalent to |
|
Equivalent to |
|
Equivalent to |