Carna  Version 3.3.2
Public Member Functions | Protected Member Functions | List of all members
Carna::base::VertexBufferBase Class Reference

Maintains GL_ARRAY_BUFFER object that holds vertices. This class realizes the RAII-idiom. More...

#include <VertexBuffer.h>

+ Inheritance diagram for Carna::base::VertexBufferBase:
+ Collaboration diagram for Carna::base::VertexBufferBase:

Public Member Functions

 VertexBufferBase ()
 Creates GL_ARRAY_BUFFER object.
 
- Public Member Functions inherited from Carna::base::BaseBuffer
virtual ~BaseBuffer ()
 Deletes the maintained OpenGL buffer object.
 
std::size_t size () const
 Tells the previously set size of the maintained buffer object.
 
void bind () const
 Invokes glBindBuffer to bind the maintained buffer object to target.
 
bool isValid () const
 Tells whether the buffer object was marked as valid.
 

Protected Member Functions

void copy (const void *bufferPtr, std::size_t bufferSize, std::size_t verticesCount)
 Copies verticesCount vertices referenced by bufferPtr to the maintained vertex buffer object.
 
- Protected Member Functions inherited from Carna::base::BaseBuffer
 BaseBuffer (unsigned int target)
 Acquires new OpenGL buffer object. More...
 
void setSize (std::size_t size)
 Sets the size of the maintained buffer object.
 

Additional Inherited Members

- Public Attributes inherited from Carna::base::BaseBuffer
const unsigned int target
 Holds where the maintained buffer object is to be bound to by glBindBuffer.
 
const unsigned int id
 Holds the ID of the maintained OpenGL buffer object.
 
- Protected Attributes inherited from Carna::base::BaseBuffer
bool valid
 Flag that indicates whether the maintained OpenGL buffer object is valid.
 

Detailed Description

Maintains GL_ARRAY_BUFFER object that holds vertices. This class realizes the RAII-idiom.

Author
Leonid Kostrykin
Date
1.9.14 - 14.3.15

Definition at line 42 of file VertexBuffer.h.


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