index_buffer Class Reference

#include <vbuffer.hpp>

Inheritance diagram for index_buffer:

Inheritance graph
[legend]
Collaboration diagram for index_buffer:

Collaboration graph
[legend]

List of all members.


Detailed Description

Encapsulates an index buffer object.

Definition at line 127 of file vbuffer.hpp.


Public Member Functions

void append (const T &t)
void bind ()
 Binds the buffer object for use with OpenGL.
gsgl::data::simple_array< T > & get_buffer ()
 index_buffer (const vbuffer::update_mode &mode, const gsgl::index_t inital_capacity=0)
void load ()
 Loads the buffer object into the video card.
T & operator[] (const gsgl::index_t &i)
const T & operator[] (const gsgl::index_t &i) const
gsgl::index_t size () const
void unbind ()
 Unbinds the buffer object for use with OpenGL.
void unload ()
 Unloads the buffer object from the video card.
virtual ~index_buffer ()

Protected Member Functions

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

Protected Attributes

int highest_dirty_index
int lowest_dirty_index

Constructor & Destructor Documentation

index_buffer ( const vbuffer::update_mode mode,
const gsgl::index_t  inital_capacity = 0 
)

Definition at line 124 of file vbuffer.cpp.

~index_buffer (  )  [virtual]

Definition at line 130 of file vbuffer.cpp.


Member Function Documentation

void append ( const T &  t  )  [inline, inherited]

Definition at line 112 of file vbuffer.hpp.

Referenced by clipmap_ring::init(), and simple_sphere::simple_sphere().

void bind (  )  [inherited]

virtual gsgl::index_t buffer_size (  )  [inline, protected, virtual, inherited]

Implements vbuffer_base.

Definition at line 118 of file vbuffer.hpp.

virtual size_t element_size (  )  [inline, protected, virtual, inherited]

Implements vbuffer_base.

Definition at line 119 of file vbuffer.hpp.

gsgl::data::simple_array<T>& get_buffer (  )  [inline, inherited]

Definition at line 109 of file vbuffer.hpp.

virtual void* get_ptr (  )  [inline, protected, virtual, inherited]

Implements vbuffer_base.

Definition at line 120 of file vbuffer.hpp.

void load (  )  [inherited]

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().

T& operator[] ( const gsgl::index_t i  )  [inline, inherited]

Definition at line 115 of file vbuffer.hpp.

const T& operator[] ( const gsgl::index_t i  )  const [inline, inherited]

Definition at line 114 of file vbuffer.hpp.

gsgl::index_t size (  )  const [inline, inherited]

Definition at line 111 of file vbuffer.hpp.

Referenced by checkered_box::draw(), submesh::draw(), and clipmap_ring::init().

void unbind (  )  [inherited]

Unbinds the buffer object for use with OpenGL.

Definition at line 116 of file vbuffer.cpp.

References vbuffer_base::target.

void unload (  )  [inherited]

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

int highest_dirty_index [protected, inherited]

Definition at line 87 of file vbuffer.hpp.

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

int lowest_dirty_index [protected, inherited]

Definition at line 87 of file vbuffer.hpp.

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


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