GL++
0.1
OpenGL API C++ Wrapper
|
A general object for unformatted linear memory allocated by the OpenGL context. More...
#include <buffer.hpp>
Public Member Functions | |
buffer (buffer_type type) | |
Construct an empty buffer object. | |
~buffer () | |
Destroy and release resources of buffer. | |
buffer_type | type () const |
Get the defined target type that this buffer will be binded at. | |
void | bind () const |
Bind this buffer to its defined target type. | |
void | bind_to_point (GLuint point) const |
Bind base at specific index of arrayed targets (valid for some types) | |
void | bind_to_point (GLuint point, size_t offset, size_t size) const |
Bind a range to specific index of arrayed targets (valid for some types) | |
size_t | size () const |
The size of this buffer as defined by define_data() | |
void | define_data (size_t size, const void *pdata, buffer_usage_pattern usage) |
Create and initializes a buffer object's data store. | |
void | update_subdata (size_t offset, size_t size, const void *pdata) |
Create and initializes a buffer object's data store. | |
std::vector< uint8_t > | get_data (size_t offset, size_t size) |
Get a subset of a buffer object's data store. | |
void * | map_data (buffer_access_mode access) |
Map buffer's storage to host memory address. | |
bool | unmap_data () |
Unmap any previously mapped range. | |
void * | map_data_range (size_t offset, size_t size, map_access_bit access) |
Map a range of buffer's storaget to host memory address. | |
void | flush_mapped_range (size_t offset, size_t size) |
Indicate modifications to a range of a mapped buffer. | |
Public Member Functions inherited from glpp::named_object< GLuint > | |
name_type | object_name () const |
Return the name of object (handle) | |
Public Member Functions inherited from glpp::noncopyable | |
noncopyable (noncopyable &) | |
noncopyable & | operator= (noncopyable &) |
Protected Attributes | |
buffer_type | m_buf_type |
Buffer target type. | |
size_t | m_size |
Size of this buffer storage. | |
Protected Attributes inherited from glpp::named_object< GLuint > | |
GLuint | m_gl_name |
Stored object name. |
Additional Inherited Members | |
Public Types inherited from glpp::named_object< GLuint > | |
typedef GLuint | name_type |
Type of the name. |
A general object for unformatted linear memory allocated by the OpenGL context.
glpp::buffer::buffer | ( | buffer_type | type | ) |
Construct an empty buffer object.
http://www.opengl.org/sdk/docs/man4/xhtml/glGenBuffers.xml
type | Is the target that this buffer will be used for. |
glpp::buffer::~buffer | ( | ) |
Destroy and release resources of buffer.
http://www.opengl.org/sdk/docs/man4/xhtml/glDeleteBuffers.xml
|
inline |
Bind this buffer to its defined target type.
|
inline |
Bind base at specific index of arrayed targets (valid for some types)
http://www.opengl.org/sdk/docs/man4/xhtml/glBindBufferBase.xml
|
inline |
Bind a range to specific index of arrayed targets (valid for some types)
http://www.opengl.org/sdk/docs/man4/xhtml/glBindBufferRange.xml
void glpp::buffer::define_data | ( | size_t | size, |
const void * | pdata, | ||
buffer_usage_pattern | usage | ||
) |
Create and initializes a buffer object's data store.
void glpp::buffer::flush_mapped_range | ( | size_t | offset, |
size_t | size | ||
) |
Indicate modifications to a range of a mapped buffer.
http://www.opengl.org/sdk/docs/man4/xhtml/glFlushMappedBufferRange.xml
std::vector< uint8_t > glpp::buffer::get_data | ( | size_t | offset, |
size_t | size | ||
) |
Get a subset of a buffer object's data store.
void * glpp::buffer::map_data | ( | buffer_access_mode | access | ) |
Map buffer's storage to host memory address.
http://www.opengl.org/sdk/docs/man4/xhtml/glMapBuffer.xml
void * glpp::buffer::map_data_range | ( | size_t | offset, |
size_t | size, | ||
map_access_bit | access | ||
) |
Map a range of buffer's storaget to host memory address.
http://www.opengl.org/sdk/docs/man4/xhtml/glMapBufferRange.xml
|
inline |
The size of this buffer as defined by define_data()
Functions that depend on exclusive use of glpp API define_data()
|
inline |
Get the defined target type that this buffer will be binded at.
bool glpp::buffer::unmap_data | ( | ) |
Unmap any previously mapped range.
http://www.opengl.org/sdk/docs/man4/xhtml/glMapBuffer.xml
void glpp::buffer::update_subdata | ( | size_t | offset, |
size_t | size, | ||
const void * | pdata | ||
) |
Create and initializes a buffer object's data store.
http://www.opengl.org/sdk/docs/man4/xhtml/glBufferSubData.xml