#include <BufferObj.h>
Inherited by cinder::gl::Pbo, cinder::gl::Ssbo, cinder::gl::Ubo, and cinder::gl::Vbo.
|
| BufferObj (GLenum target) |
|
| BufferObj (GLenum target, GLsizeiptr allocationSize, const void *data, GLenum usage) |
|
cinder::gl::BufferObj::~BufferObj |
( |
| ) |
|
cinder::gl::BufferObj::BufferObj |
( |
GLenum |
target | ) |
|
|
protected |
cinder::gl::BufferObj::BufferObj |
( |
GLenum |
target, |
|
|
GLsizeiptr |
allocationSize, |
|
|
const void * |
data, |
|
|
GLenum |
usage |
|
) |
| |
|
protected |
BufferObjRef cinder::gl::BufferObj::create |
( |
GLenum |
target, |
|
|
GLsizeiptr |
allocationSize, |
|
|
const void * |
data, |
|
|
GLenum |
usage |
|
) |
| |
|
static |
void cinder::gl::BufferObj::bind |
( |
| ) |
const |
void cinder::gl::BufferObj::unbind |
( |
| ) |
const |
void cinder::gl::BufferObj::bufferData |
( |
GLsizeiptr |
size, |
|
|
const GLvoid * |
data, |
|
|
GLenum |
usage |
|
) |
| |
Analogous to glBufferData()
void cinder::gl::BufferObj::bufferSubData |
( |
GLintptr |
offset, |
|
|
GLsizeiptr |
size, |
|
|
const GLvoid * |
data |
|
) |
| |
Analogous to glBufferSubData()
void cinder::gl::BufferObj::getBufferSubData |
( |
GLintptr |
offset, |
|
|
GLsizeiptr |
size, |
|
|
GLvoid * |
data |
|
) |
| |
Returns some or all of the data from the buffer object currently bound for this objects target.
void cinder::gl::BufferObj::copyData |
( |
GLsizeiptr |
size, |
|
|
const GLvoid * |
data |
|
) |
| |
Calls bufferSubData when the size is adequate, otherwise calls bufferData, forcing a reallocation of the data store.
void cinder::gl::BufferObj::ensureMinimumSize |
( |
GLsizeiptr |
minimumSize | ) |
|
Reallocates the buffer if its size is smaller than minimumSize. This destroys the contents of the buffer if it must be reallocated.
void * cinder::gl::BufferObj::map |
( |
GLenum |
access | ) |
const |
Analogous to glMapBuffer(). access must be GL_READ_ONLY
, GL_WRITE_ONLY
, or GL_READ_WRITE
. On iOS ES 2 only GL_WRITE_ONLY_OES
is valid.
void * cinder::gl::BufferObj::mapWriteOnly |
( |
| ) |
|
Maps the Buffer for writing, but does not invalidate the Buffer's existing contents. Slower than mapReplace(). Abstracts glMapBuffer() vs. glMapBufferRange() with appropriate write-only parameters for the platform.
void * cinder::gl::BufferObj::mapReplace |
( |
| ) |
|
Invalidates the Buffer's existing contents and maps it for writing. Preferable to mapWriteOnly() when invalidation is acceptable. Abstracts glMapBuffer() vs. glMapBufferRange() with appropriate write-only parameters for the platform.
void * cinder::gl::BufferObj::mapBufferRange |
( |
GLintptr |
offset, |
|
|
GLsizeiptr |
length, |
|
|
GLbitfield |
access |
|
) |
| const |
Analogous to glMapBufferRange(). On iOS ES 2 only GL_WRITE_ONLY_OES
is valid.
void cinder::gl::BufferObj::unmap |
( |
| ) |
const |
GLuint cinder::gl::BufferObj::getId |
( |
| ) |
const |
size_t cinder::gl::BufferObj::getSize |
( |
| ) |
const |
GLenum cinder::gl::BufferObj::getTarget |
( |
| ) |
const |
void cinder::gl::BufferObj::setTarget |
( |
GLenum |
target | ) |
|
GLenum cinder::gl::BufferObj::getUsage |
( |
| ) |
const |
void cinder::gl::BufferObj::setUsage |
( |
GLenum |
usage | ) |
|
GLuint cinder::gl::BufferObj::getBindingConstantForTarget |
( |
GLenum |
target | ) |
|
|
static |
Returns the appropriate parameter to glGetIntegerv() for a specific target; ie GL_ARRAY_BUFFER -> GL_ARRAY_BUFFER_BINDING. Returns 0 on failure.
const std::string& cinder::gl::BufferObj::getLabel |
( |
| ) |
const |
Returns the debugging label associated with the Buffer.
void cinder::gl::BufferObj::setLabel |
( |
const std::string & |
label | ) |
|
Sets the debugging label associated with the Buffer. Calls glObjectLabel() when available.
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const BufferObj & |
rhs |
|
) |
| |
|
friend |
GLuint cinder::gl::BufferObj::mId |
|
protected |
size_t cinder::gl::BufferObj::mSize |
|
protected |
GLenum cinder::gl::BufferObj::mTarget |
|
protected |
GLenum cinder::gl::BufferObj::mUsage |
|
protected |
std::string cinder::gl::BufferObj::mLabel |
|
protected |
The documentation for this class was generated from the following files: