|
Visualization Library 2.1.0
A 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>
Inheritance diagram for vl::BufferObject: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(). More... | |
Public Member Functions inherited from vl::Buffer | |
| Buffer () | |
| Buffer (const Buffer &other) | |
| Buffer & | operator= (const Buffer &other) |
| void | swap (Buffer &other) |
| ~Buffer () | |
| void | clear () |
| void | resize (size_t byte_count, size_t alignment=0) |
| void | setUserAllocatedBuffer (void *ptr, size_t bytes) |
| Uses a user-allocated buffer as storage. More... | |
| void | setAllocationMode (EAllocationMode mode) |
| EAllocationMode | allocationMode () const |
| size_t | bytesUsed () const |
| bool | empty () const |
| unsigned char * | ptr () |
| const unsigned char * | ptr () const |
| size_t | alignment () const |
Public Member Functions inherited from vl::Object | |
| Object () | |
| Constructor. More... | |
| Object (const Object &other) | |
| Copy constructor: copies the name, ref count mutex and user data. More... | |
| Object & | operator= (const Object &other) |
| Copy operator: copies the object's name, ref count mutex and user data. More... | |
| const std::string & | objectName () const |
| The name of the object, by default set to the object's class name. More... | |
| void | setObjectName (const char *name) |
| The name of the object, by default set to the object's class name in debug builds. More... | |
| void | setObjectName (const std::string &name) |
| The name of the object, by default set to the object's class name in debug builds. More... | |
| void | setRefCountMutex (IMutex *mutex) |
| The mutex used to protect the reference counting of an Object across multiple threads. More... | |
| IMutex * | refCountMutex () |
| The mutex used to protect the reference counting of an Object across multiple threads. More... | |
| const IMutex * | refCountMutex () const |
| The mutex used to protect the reference counting of an Object across multiple threads. More... | |
| int | referenceCount () const |
| Returns the number of references of an object. More... | |
| void | incReference () const |
| Increments the reference count of an object. More... | |
| void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
| void | setAutomaticDelete (bool autodel_on) |
| If set to true the Object is deleted when its reference count reaches 0. More... | |
| bool | automaticDelete () const |
| If set to true the Object is deleted when its reference count reaches 0. More... | |
| template<class T > | |
| T * | as () |
| Casts an Object to the specified class. More... | |
| template<class T > | |
| const T * | as () const |
| Casts an Object to the specified class. More... | |
Protected Attributes | |
| unsigned int | mHandle |
| GLsizeiptr | mByteCountBufferObject |
| EBufferObjectUsage | mUsage |
Protected Attributes inherited from vl::Buffer | |
| unsigned char * | mPtr |
| size_t | mByteCount |
| size_t | mAlignment |
| EAllocationMode | mAllocationMode |
Protected Attributes inherited from vl::Object | |
| std::string | mObjectName |
| IMutex * | mRefCountMutex |
| int | mReferenceCount |
| bool | mAutomaticDelete |
Additional Inherited Members | |
Public Types inherited from vl::Buffer | |
| enum | EAllocationMode { UserAllocatedBuffer, AutoAllocatedBuffer } |
Static Public Member Functions inherited from vl::Buffer | |
| static void * | alignedMalloc (size_t bytes, size_t alignment) |
| static void | alignedFree (void *ptr) |
Protected Member Functions inherited from vl::Object | |
| virtual | ~Object () |
The BufferObject class is a Buffer that can upload its data on the GPU memory.
Definition at line 55 of file BufferObject.hpp.
|
inline |
Definition at line 60 of file BufferObject.hpp.
References vl::BU_STATIC_DRAW, mByteCountBufferObject, mHandle, and mUsage.
|
inline |
Definition at line 68 of file BufferObject.hpp.
References vl::BU_STATIC_DRAW, mByteCountBufferObject, mHandle, and mUsage.
|
inline |
Definition at line 105 of file BufferObject.hpp.
References deleteBufferObject().
|
inline |
Definition at line 114 of file BufferObject.hpp.
References mByteCountBufferObject.
Referenced by downloadBufferObject(), setBufferSubData(), and vl::Array< bvec2, GLbyte, 2, GL_BYTE >::sizeBufferObject().
|
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().
|
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::DrawPixels::Pixels::deletePixelBufferObject(), operator=(), and ~BufferObject().
|
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.
|
inline |
Definition at line 112 of file BufferObject.hpp.
References mHandle.
Referenced by vl::OpenGLContext::bindVAS_Attribs(), vl::OpenGLContext::bindVAS_Fixed(), createBufferObject(), vl::Texture::createTexture(), deleteBufferObject(), downloadBufferObject(), vl::DrawPixels::Pixels::hasPixelBufferObject(), mapBufferObject(), vl::readPixels(), vl::DrawPixels::render_Implementation(), setBufferData(), setBufferSubData(), setHandle(), and unmapBufferObject().
|
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().
|
inline |
Definition at line 79 of file BufferObject.hpp.
References deleteBufferObject().
|
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::DrawPixels::Pixels::generatePixelBufferObject(), vl::readPixels(), and vl::ArrayAbstract::updateBufferObject().
|
inline |
Definition at line 168 of file BufferObject.hpp.
References createBufferObject(), handle(), vl::Has_BufferObject, mByteCountBufferObject, mUsage, usage(), VL_CHECK, and VL_CHECK_OGL.
|
inline |
Definition at line 187 of file BufferObject.hpp.
References byteCountBufferObject(), vl::Buffer::clear(), and vl::Buffer::ptr().
|
inline |
Definition at line 198 of file BufferObject.hpp.
References handle(), vl::Has_BufferObject, VL_CHECK, and VL_CHECK_OGL.
|
inline |
Definition at line 110 of file BufferObject.hpp.
|
inline |
Definition at line 87 of file BufferObject.hpp.
References mByteCountBufferObject, mHandle, mUsage, and vl::Buffer::swap().
|
inline |
Definition at line 241 of file BufferObject.hpp.
References createBufferObject(), handle(), vl::Has_BufferObject, VL_CHECK, and VL_CHECK_OGL.
Referenced by downloadBufferObject().
|
inline |
BufferObject usage flag as specified by setBufferData().
Definition at line 259 of file BufferObject.hpp.
References mUsage.
Referenced by vl::readPixels(), and setBufferData().
|
protected |
Definition at line 263 of file BufferObject.hpp.
Referenced by BufferObject(), byteCountBufferObject(), createBufferObject(), deleteBufferObject(), setBufferData(), and swap().
|
protected |
Definition at line 262 of file BufferObject.hpp.
Referenced by BufferObject(), createBufferObject(), deleteBufferObject(), handle(), setHandle(), and swap().
|
protected |
Definition at line 264 of file BufferObject.hpp.
Referenced by BufferObject(), setBufferData(), swap(), and usage().
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:48.
© Copyright Michele Bosi. All rights reserved.