vbuffer_base Class Reference

#include <vbuffer.hpp>

Inheritance diagram for vbuffer_base:

Inheritance graph
[legend]
Collaboration diagram for vbuffer_base:

Collaboration graph
[legend]

List of all members.


Detailed Description

An intermediate class so we don't pollute the header namespaces with OpenGL stuff.

Definition at line 70 of file vbuffer.hpp.


Public Member Functions

void bind ()
 Binds the buffer object for use with OpenGL.
void load ()
 Loads the buffer object into the video card.
void unbind ()
 Unbinds the buffer object for use with OpenGL.
void unload ()
 Unloads the buffer object from the video card.
 vbuffer_base (const int &target, const int &mode)
virtual ~vbuffer_base ()

Protected Member Functions

virtual gsgl::index_t buffer_size ()=0
virtual size_t element_size ()=0
virtual void * get_ptr ()=0

Protected Attributes

int highest_dirty_index
int lowest_dirty_index

Private Attributes

const int gl_mode
int opengl_id
size_t prev_size
const int target

Constructor & Destructor Documentation

vbuffer_base ( const int &  target,
const int &  mode 
)

Definition at line 47 of file vbuffer.cpp.

~vbuffer_base (  )  [virtual]

Definition at line 54 of file vbuffer.cpp.

References vbuffer_base::unload().


Member Function Documentation

void bind (  ) 

virtual gsgl::index_t buffer_size (  )  [protected, pure virtual]

virtual size_t element_size (  )  [protected, pure virtual]

virtual void* get_ptr (  )  [protected, pure virtual]

void load (  ) 

Loads the buffer object into the video card.

Definition at line 60 of file vbuffer.cpp.

References CHECK_GL_ERRORS, and vbuffer_base::opengl_id.

Referenced by vbuffer_base::bind(), and submesh::load().

void unbind (  ) 

Unbinds the buffer object for use with OpenGL.

Definition at line 116 of file vbuffer.cpp.

References vbuffer_base::target.

void unload (  ) 

Unloads the buffer object from the video card.

Definition at line 68 of file vbuffer.cpp.

References CHECK_GL_ERRORS, and vbuffer_base::opengl_id.

Referenced by checkered_box::cleanup(), submesh::unload(), and vbuffer_base::~vbuffer_base().


Member Data Documentation

const int gl_mode [private]

Definition at line 72 of file vbuffer.hpp.

Referenced by vbuffer_base::bind().

int highest_dirty_index [protected]

Definition at line 87 of file vbuffer.hpp.

Referenced by vbuffer_base::bind(), and vbuffer_mixin< unsigned int >::operator[]().

int lowest_dirty_index [protected]

Definition at line 87 of file vbuffer.hpp.

Referenced by vbuffer_base::bind(), and vbuffer_mixin< unsigned int >::operator[]().

int opengl_id [private]

Definition at line 73 of file vbuffer.hpp.

Referenced by vbuffer_base::bind(), vbuffer_base::load(), and vbuffer_base::unload().

size_t prev_size [private]

Definition at line 75 of file vbuffer.hpp.

Referenced by vbuffer_base::bind().

const int target [private]

Definition at line 72 of file vbuffer.hpp.

Referenced by vbuffer_base::bind(), and vbuffer_base::unbind().


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

Generated on Sat Mar 1 13:50:07 2008 for Periapsis Project by  doxygen 1.5.5