An OGLplus object encapsulating the OpenGL buffer functionality. More...
#include </home/chochlik/devel/oglplus/include/oglplus/buffer.hpp>


Public Types | |
| typedef BufferTarget | Target |
| Buffer bind targets. | |
| typedef BufferIndexedTarget | IndexedTarget |
| Buffer indexed bind targets. | |
| typedef TypedMap< GLubyte > | Map |
| Mapping of the buffer to the client address space. | |
Public Member Functions | |
| void | Bind (Target target) const |
| Bind this buffer to the specified target. | |
| void | BindBase (IndexedTarget target, GLuint index) const |
| Bind this buffer to the specified indexed target. | |
| void | BindBaseUniform (UniformBufferBindingPoint index) const |
| Bind this buffer to the specified uniform buffer binding point. | |
| void | BindBaseTransformFeedback (TransformFeedbackBufferBindingPoint index) const |
| Bind this buffer to the specified TFB buffer binding point. | |
| void | BindBaseAtomicCounter (AtomicCounterBufferBindingPoint index) const |
| Bind this buffer to the specified atomic counter buffer binding point. | |
| void | BindBaseShaderStorage (ShaderStorageBufferBindingPoint index) const |
| Bind this buffer to the specified shader storage buffer binding point. | |
| void | BindRange (IndexedTarget target, GLuint index, GLintptr offset, GLsizeiptr size) const |
| Bind a range in this buffer to the specified indexed target. | |
Static Public Member Functions | |
| static bool | Mapped (Target target) |
| Returns true if the buffer is mapped. | |
| static void | Unbind (Target target) |
| Unbind the current buffer from the specified target. | |
| static void | UnbindBase (IndexedTarget target, GLuint index) |
| Unbind the current buffer from the specified indexed target. | |
| template<typename GLtype > | |
| static void | Data (Target target, GLsizei count, GLtype *data, BufferUsage usage=BufferUsage::StaticDraw) |
| Uploads (sets) the buffer data. | |
| template<typename GLtype > | |
| static void | Data (Target target, const std::vector< GLtype > &data, BufferUsage usage=BufferUsage::StaticDraw) |
| Uploads (sets) the buffer data. | |
| template<typename GLtype , std::size_t N> | |
| static void | Data (Target target, const std::vector< Vector< GLtype, N > > &data, BufferUsage usage=BufferUsage::StaticDraw) |
| Uploads (sets) the buffer data. | |
| template<typename GLtype > | |
| static void | SubData (Target target, GLintptr offset, GLsizei count, GLtype *data) |
| Uploads (sets) a subrange of the buffer data. | |
| template<typename GLtype > | |
| static void | SubData (Target target, GLintptr offset, const std::vector< GLtype > &data) |
| Uploads (sets) a subrange of the buffer data. | |
| static void | CopySubData (BufferOps::Target readtarget, BufferOps::Target writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size) |
| Copy data between buffers. | |
| template<typename GLtype > | |
| static void | ClearData (Target target, PixelDataInternalFormat internal_format, PixelDataFormat format, const std::vector< GLtype > &data) |
| Clear the buffer data. | |
| template<typename GLtype > | |
| static void | ClearSubData (Target target, PixelDataInternalFormat internal_format, GLintptr offset, GLsizeiptr size, PixelDataFormat format, const std::vector< GLtype > &data) |
| Clear a subrange of the buffer data. | |
| static GLsizei | Size (Target target) |
| Returns the buffer size. | |
| static BufferUsage | Usage (Target target) |
| Returns the buffer usage. | |
| static BufferMapAccess | Access (Target target) |
| Returns the buffer usage. | |
An OGLplus object encapsulating the OpenGL buffer functionality.
| static BufferMapAccess oglplus::BufferOps::Access | ( | Target | target | ) | [static, inherited] |
Returns the buffer usage.
GL_BUFFER_ACCESS| Error |
| void oglplus::BufferOps::Bind | ( | Target | target | ) | const [inherited] |
Bind this buffer to the specified target.
| Error |
| void oglplus::BufferOps::BindBase | ( | IndexedTarget | target, |
| GLuint | index | ||
| ) | const [inherited] |
Bind this buffer to the specified indexed target.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
Referenced by oglplus::BufferOps::BindBaseAtomicCounter(), oglplus::BufferOps::BindBaseShaderStorage(), oglplus::BufferOps::BindBaseTransformFeedback(), and oglplus::BufferOps::BindBaseUniform().
| void oglplus::BufferOps::BindBaseAtomicCounter | ( | AtomicCounterBufferBindingPoint | index | ) | const [inherited] |
Bind this buffer to the specified atomic counter buffer binding point.
| Error |
References oglplus::AtomicCounter, and oglplus::BufferOps::BindBase().
| void oglplus::BufferOps::BindBaseShaderStorage | ( | ShaderStorageBufferBindingPoint | index | ) | const [inherited] |
Bind this buffer to the specified shader storage buffer binding point.
| Error |
References oglplus::BufferOps::BindBase(), and oglplus::ShaderStorage.
| void oglplus::BufferOps::BindBaseTransformFeedback | ( | TransformFeedbackBufferBindingPoint | index | ) | const [inherited] |
Bind this buffer to the specified TFB buffer binding point.
| Error |
References oglplus::BufferOps::BindBase(), and oglplus::TransformFeedback.
| void oglplus::BufferOps::BindBaseUniform | ( | UniformBufferBindingPoint | index | ) | const [inherited] |
Bind this buffer to the specified uniform buffer binding point.
| Error |
References oglplus::BufferOps::BindBase(), and oglplus::Uniform.
| void oglplus::BufferOps::BindRange | ( | IndexedTarget | target, |
| GLuint | index, | ||
| GLintptr | offset, | ||
| GLsizeiptr | size | ||
| ) | const [inherited] |
Bind a range in this buffer to the specified indexed target.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
| static void oglplus::BufferOps::ClearData | ( | Target | target, |
| PixelDataInternalFormat | internal_format, | ||
| PixelDataFormat | format, | ||
| const std::vector< GLtype > & | data | ||
| ) | [static, inherited] |
Clear the buffer data.
| Error | Requires OpenGL 4.3. |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::ClearData().
| static void oglplus::BufferOps::ClearSubData | ( | Target | target, |
| PixelDataInternalFormat | internal_format, | ||
| GLintptr | offset, | ||
| GLsizeiptr | size, | ||
| PixelDataFormat | format, | ||
| const std::vector< GLtype > & | data | ||
| ) | [static, inherited] |
Clear a subrange of the buffer data.
| Error | Requires OpenGL 4.3. |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::ClearSubData().
| static void oglplus::BufferOps::CopySubData | ( | BufferOps::Target | readtarget, |
| BufferOps::Target | writetarget, | ||
| GLintptr | readoffset, | ||
| GLintptr | writeoffset, | ||
| GLsizeiptr | size | ||
| ) | [static, inherited] |
Copy data between buffers.
| Error | Requires OpenGL 3.1 or the GL_ARB_copy_buffer extension. |
References OGLPLUS_CHECK.
| static void oglplus::BufferOps::Data | ( | Target | target, |
| GLsizei | count, | ||
| GLtype * | data, | ||
| BufferUsage | usage = BufferUsage::StaticDraw |
||
| ) | [static, inherited] |
Uploads (sets) the buffer data.
This member function uploads count units of sizeof(GLtype) from the location pointed to by data to the buffer bound to the specified target using the usage as hint.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::Data().
| static void oglplus::BufferOps::Data | ( | Target | target, |
| const std::vector< GLtype > & | data, | ||
| BufferUsage | usage = BufferUsage::StaticDraw |
||
| ) | [static, inherited] |
Uploads (sets) the buffer data.
This member function uploads data.size() units of sizeof(GLtype) from the location pointed to by data.data() to the buffer bound to the specified target using the usage as hint.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
| static void oglplus::BufferOps::Data | ( | Target | target, |
| const std::vector< Vector< GLtype, N > > & | data, | ||
| BufferUsage | usage = BufferUsage::StaticDraw |
||
| ) | [static, inherited] |
Uploads (sets) the buffer data.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
| static bool oglplus::BufferOps::Mapped | ( | Target | target | ) | [static, inherited] |
Returns true if the buffer is mapped.
GL_BUFFER_MAPPED| Error |
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::Mapped().
| static GLsizei oglplus::BufferOps::Size | ( | Target | target | ) | [static, inherited] |
Returns the buffer size.
GL_BUFFER_SIZE| Error |
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::Size().
| static void oglplus::BufferOps::SubData | ( | Target | target, |
| GLintptr | offset, | ||
| GLsizei | count, | ||
| GLtype * | data | ||
| ) | [static, inherited] |
Uploads (sets) a subrange of the buffer data.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::SubData().
| static void oglplus::BufferOps::SubData | ( | Target | target, |
| GLintptr | offset, | ||
| const std::vector< GLtype > & | data | ||
| ) | [static, inherited] |
Uploads (sets) a subrange of the buffer data.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_CHECK.
| static void oglplus::BufferOps::Unbind | ( | Target | target | ) | [static, inherited] |
Unbind the current buffer from the specified target.
This function binds the name 0 to the specified target.
| Error |
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
| static void oglplus::BufferOps::UnbindBase | ( | IndexedTarget | target, |
| GLuint | index | ||
| ) | [static, inherited] |
Unbind the current buffer from the specified indexed target.
| Error |
References OGLPLUS_VERIFY.
| static BufferUsage oglplus::BufferOps::Usage | ( | Target | target | ) | [static, inherited] |
Returns the buffer usage.
GL_BUFFER_USAGE| Error |
Referenced by oglplus::BoundTemplate< Base, BaseParam, BufferOps >::Usage().