Carna Version 3.3.3
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Carna::base::BaseBuffer Class Reference

Implements OpenGL buffer objects maintenance RAII base class. More...

#include <BaseBuffer.h>

+ Inheritance diagram for Carna::base::BaseBuffer:

Public Member Functions

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.
 

Public Attributes

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 Member Functions

 BaseBuffer (unsigned int target)
 Acquires new OpenGL buffer object.
 
void setSize (std::size_t size)
 Sets the size of the maintained buffer object.
 

Protected Attributes

bool valid
 Flag that indicates whether the maintained OpenGL buffer object is valid.
 

Detailed Description

Implements OpenGL buffer objects maintenance RAII base class.

Author
Leonid Kostrykin
Date
1.9.14 - 14.3.15

Definition at line 39 of file BaseBuffer.h.

Constructor & Destructor Documentation

◆ BaseBuffer()

Carna::base::BaseBuffer::BaseBuffer ( unsigned int  target)
explicitprotected

Acquires new OpenGL buffer object.

Parameters
targetspecifies where the buffer object is to be bound to by glBindBuffer.

Member Data Documentation

◆ id

const unsigned int Carna::base::BaseBuffer::id

Holds the ID of the maintained OpenGL buffer object.

Definition at line 79 of file BaseBuffer.h.

◆ target

const unsigned int Carna::base::BaseBuffer::target

Holds where the maintained buffer object is to be bound to by glBindBuffer.

Definition at line 74 of file BaseBuffer.h.

◆ valid

bool Carna::base::BaseBuffer::valid
protected

Flag that indicates whether the maintained OpenGL buffer object is valid.

Definition at line 49 of file BaseBuffer.h.


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