Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::BufferObject Class Reference

The BufferObject class is a Buffer that can upload its data on the GPU memory. More...

#include <BufferObject.hpp>

Inheritance diagram for vl::BufferObject:
vl::Buffer vl::Object

List of all members.

Public Member Functions

 BufferObject ()
 BufferObject (const BufferObject &other)
BufferObjectoperator= (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

Detailed Description

The BufferObject class is a Buffer that can upload its data on the GPU memory.

Remarks:
BufferObject is the storage used by ArrayAbstract and subclasses like ArrayFloat3, ArrayUByte4 etc.

Definition at line 55 of file BufferObject.hpp.


Constructor & Destructor Documentation

vl::BufferObject::BufferObject (  ) [inline]
vl::BufferObject::BufferObject ( const BufferObject other ) [inline]
vl::BufferObject::~BufferObject (  ) [inline]

Definition at line 105 of file BufferObject.hpp.

References deleteBufferObject().


Member Function Documentation

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.

References handle(), and mHandle.

unsigned int vl::BufferObject::handle (  ) const [inline]
GLsizeiptr vl::BufferObject::byteCountBufferObject (  ) const [inline]
void vl::BufferObject::createBufferObject (  ) [inline]
void vl::BufferObject::deleteBufferObject (  ) [inline]
void vl::BufferObject::downloadBufferObject (  ) [inline]
void vl::BufferObject::setBufferData ( EBufferObjectUsage  usage,
bool  discard_local_storage = false 
) [inline]
void vl::BufferObject::setBufferData ( GLsizeiptr  byte_count,
const GLvoid *  data,
EBufferObjectUsage  usage 
) [inline]
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]
bool vl::BufferObject::unmapBufferObject (  ) [inline]
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().


Member Data Documentation

unsigned int vl::BufferObject::mHandle [protected]

Definition at line 264 of file BufferObject.hpp.

Referenced by BufferObject(), setBufferData(), swap(), and usage().


The documentation for this class was generated from the following file:

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:09.
Permission is granted to use this page to write and publish articles regarding Visualization Library.