Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The BufferObject class is a Buffer that can upload its data on the GPU memory. More...
#include <BufferObject.hpp>
Public Member Functions | |
BufferObject () | |
BufferObject (const BufferObject &other) | |
BufferObject & | operator= (const BufferObject &other) |
void | swap (BufferObject &other) |
~BufferObject () | |
void | setHandle (unsigned int handle) |
unsigned int | handle () const |
GLsizeiptr | byteCountBufferObject () const |
void | createBufferObject () |
void | deleteBufferObject () |
void | downloadBufferObject () |
void | setBufferData (EBufferObjectUsage usage, bool discard_local_storage=false) |
void | setBufferData (GLsizeiptr byte_count, const GLvoid *data, EBufferObjectUsage usage) |
void | setBufferSubData (GLintptr offset=0, GLsizeiptr byte_count=-1, bool discard_local_storage=false) |
void | setBufferSubData (GLintptr offset, GLsizeiptr byte_count, const GLvoid *data) |
void * | mapBufferObject (EBufferObjectAccess access) |
bool | unmapBufferObject () |
EBufferObjectUsage | usage () const |
BufferObject usage flag as specified by setBufferData(). | |
Protected Attributes | |
unsigned int | mHandle |
GLsizeiptr | mByteCountBufferObject |
EBufferObjectUsage | mUsage |
The BufferObject class is a Buffer that can upload its data on the GPU memory.
Definition at line 55 of file BufferObject.hpp.
vl::BufferObject::BufferObject | ( | ) | [inline] |
Definition at line 60 of file BufferObject.hpp.
References vl::BU_STATIC_DRAW, mByteCountBufferObject, mHandle, mUsage, and VL_DEBUG_SET_OBJECT_NAME.
vl::BufferObject::BufferObject | ( | const BufferObject & | other ) | [inline] |
Definition at line 68 of file BufferObject.hpp.
References vl::BU_STATIC_DRAW, mByteCountBufferObject, mHandle, mUsage, and VL_DEBUG_SET_OBJECT_NAME.
vl::BufferObject::~BufferObject | ( | ) | [inline] |
Definition at line 105 of file BufferObject.hpp.
References deleteBufferObject().
BufferObject& vl::BufferObject::operator= | ( | const BufferObject & | other ) | [inline] |
Definition at line 79 of file BufferObject.hpp.
References deleteBufferObject().
void vl::BufferObject::swap | ( | BufferObject & | other ) | [inline] |
Definition at line 87 of file BufferObject.hpp.
References mByteCountBufferObject, mHandle, and mUsage.
void vl::BufferObject::setHandle | ( | unsigned int | handle ) | [inline] |
Definition at line 110 of file BufferObject.hpp.
unsigned int vl::BufferObject::handle | ( | ) | const [inline] |
Definition at line 112 of file BufferObject.hpp.
References mHandle.
Referenced by vl::OpenGLContext::bindVAS(), createBufferObject(), vl::Texture::createTexture(), deleteBufferObject(), downloadBufferObject(), mapBufferObject(), vl::readPixels(), vl::DrawPixels::render_Implementation(), setBufferData(), setBufferSubData(), setHandle(), and unmapBufferObject().
GLsizeiptr vl::BufferObject::byteCountBufferObject | ( | ) | const [inline] |
Definition at line 114 of file BufferObject.hpp.
References mByteCountBufferObject.
Referenced by downloadBufferObject(), setBufferSubData(), and vl::Array< bvec2, GLbyte, 2, GL_BYTE >::sizeBufferObject().
void vl::BufferObject::createBufferObject | ( | ) | [inline] |
Definition at line 116 of file BufferObject.hpp.
References handle(), vl::Has_BufferObject, mByteCountBufferObject, mHandle, VL_CHECK, and VL_CHECK_OGL.
Referenced by mapBufferObject(), setBufferData(), and unmapBufferObject().
void vl::BufferObject::deleteBufferObject | ( | ) | [inline] |
Definition at line 129 of file BufferObject.hpp.
References handle(), vl::Has_BufferObject, mByteCountBufferObject, mHandle, and VL_CHECK.
Referenced by vl::Array< bvec2, GLbyte, 2, GL_BYTE >::clear(), vl::Geometry::deleteBufferObject(), operator=(), and ~BufferObject().
void vl::BufferObject::downloadBufferObject | ( | ) | [inline] |
Definition at line 142 of file BufferObject.hpp.
References vl::BA_READ_ONLY, byteCountBufferObject(), handle(), vl::Has_BufferObject, mapBufferObject(), vl::Buffer::ptr(), vl::Buffer::resize(), unmapBufferObject(), and VL_CHECK.
void vl::BufferObject::setBufferData | ( | EBufferObjectUsage | usage, |
bool | discard_local_storage = false |
||
) | [inline] |
Definition at line 156 of file BufferObject.hpp.
References vl::Buffer::bytesUsed(), vl::Buffer::clear(), mUsage, vl::Buffer::ptr(), and usage().
Referenced by vl::readPixels(), and vl::ArrayAbstract::updateBufferObject().
void vl::BufferObject::setBufferData | ( | GLsizeiptr | byte_count, |
const GLvoid * | data, | ||
EBufferObjectUsage | usage | ||
) | [inline] |
Definition at line 168 of file BufferObject.hpp.
References createBufferObject(), handle(), vl::Has_BufferObject, mByteCountBufferObject, mUsage, usage(), VL_CHECK, and VL_CHECK_OGL.
void vl::BufferObject::setBufferSubData | ( | GLintptr | offset = 0 , |
GLsizeiptr | byte_count = -1 , |
||
bool | discard_local_storage = false |
||
) | [inline] |
Definition at line 187 of file BufferObject.hpp.
References byteCountBufferObject(), vl::Buffer::clear(), and vl::Buffer::ptr().
void vl::BufferObject::setBufferSubData | ( | GLintptr | offset, |
GLsizeiptr | byte_count, | ||
const GLvoid * | data | ||
) | [inline] |
Definition at line 198 of file BufferObject.hpp.
References handle(), vl::Has_BufferObject, VL_CHECK, and VL_CHECK_OGL.
void* vl::BufferObject::mapBufferObject | ( | EBufferObjectAccess | access ) | [inline] |
Definition at line 215 of file BufferObject.hpp.
References createBufferObject(), handle(), vl::Has_BufferObject, NULL, vl::Buffer::ptr(), VL_CHECK, and VL_CHECK_OGL.
Referenced by downloadBufferObject().
bool vl::BufferObject::unmapBufferObject | ( | ) | [inline] |
Definition at line 241 of file BufferObject.hpp.
References createBufferObject(), handle(), vl::Has_BufferObject, VL_CHECK, and VL_CHECK_OGL.
Referenced by downloadBufferObject().
EBufferObjectUsage vl::BufferObject::usage | ( | ) | const [inline] |
BufferObject usage flag as specified by setBufferData().
Definition at line 259 of file BufferObject.hpp.
References mUsage.
Referenced by vl::readPixels(), and setBufferData().
unsigned int vl::BufferObject::mHandle [protected] |
Definition at line 262 of file BufferObject.hpp.
Referenced by BufferObject(), createBufferObject(), deleteBufferObject(), handle(), setHandle(), and swap().
GLsizeiptr vl::BufferObject::mByteCountBufferObject [protected] |
Definition at line 263 of file BufferObject.hpp.
Referenced by BufferObject(), byteCountBufferObject(), createBufferObject(), deleteBufferObject(), setBufferData(), and swap().
EBufferObjectUsage vl::BufferObject::mUsage [protected] |
Definition at line 264 of file BufferObject.hpp.
Referenced by BufferObject(), setBufferData(), swap(), and usage().