32 #ifndef BufferObject_INCLUDE_ONCE 33 #define BufferObject_INCLUDE_ONCE 62 VL_DEBUG_SET_OBJECT_NAME()
70 VL_DEBUG_SET_OBJECT_NAME()
82 super::operator=(other);
92 unsigned int tmp_handle =
mHandle;
136 VL_glDeleteBuffers( 1, &
mHandle );
160 if (discard_local_storage)
177 VL_glBufferData( GL_ARRAY_BUFFER, byte_count, data, usage );
VL_CHECK_OGL();
187 void setBufferSubData( GLintptr offset=0, GLsizeiptr byte_count=-1,
bool discard_local_storage=
false )
191 if (discard_local_storage)
208 VL_glBufferSubData( GL_ARRAY_BUFFER, offset, byte_count, data );
VL_CHECK_OGL();
249 bool ok = VL_glUnmapBuffer( GL_ARRAY_BUFFER ) == GL_TRUE;
VL_CHECK_OGL();
void * mapBufferObject(EBufferObjectAccess access)
void deleteBufferObject()
EBufferObjectUsage mUsage
BufferObject & operator=(const BufferObject &other)
Implements a buffer whose storage is in local memory.
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)
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
GLsizeiptr mByteCountBufferObject
Visualization Library main namespace.
void downloadBufferObject()
void swap(BufferObject &other)
EBufferObjectUsage usage() const
BufferObject usage flag as specified by setBufferData().
void createBufferObject()
The BufferObject class is a Buffer that can upload its data on the GPU memory.
unsigned int handle() const
GLsizeiptr byteCountBufferObject() const
void setBufferData(EBufferObjectUsage usage, bool discard_local_storage=false)
BufferObject(const BufferObject &other)
void resize(size_t byte_count, size_t alignment=0)
Data is specified once and used many times as the source of drawing or image specification commands...
void setHandle(unsigned int handle)
Visualization Library's enums in the 'vl' namespace.