vertex_buffer Class Reference

#include <vbuffer.hpp>

Inheritance diagram for vertex_buffer:

Inheritance graph
[legend]
Collaboration diagram for vertex_buffer:

Collaboration graph
[legend]

List of all members.


Detailed Description

Encapsulates a vertex buffer object.

Definition at line 137 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 ()
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.
 vertex_buffer (const vbuffer::update_mode &mode, const gsgl::index_t initial_capacity=0)
virtual ~vertex_buffer ()
Texture coordinate access.
These functions assume 2 components per coordinate.

vbuffer::real_tget_s (const gsgl::index_t &i)
const vbuffer::real_tget_s (const gsgl::index_t &i) const
vbuffer::real_tget_t (const gsgl::index_t &i)
const vbuffer::real_tget_t (const gsgl::index_t &i) const
Vertex component access.
These functions assume 3 components per vertex.

gsgl::math::vector get_vector (const gsgl::index_t &i) const
vbuffer::real_tget_x (const gsgl::index_t &i)
const vbuffer::real_tget_x (const gsgl::index_t &i) const
vbuffer::real_tget_y (const gsgl::index_t &i)
const vbuffer::real_tget_y (const gsgl::index_t &i) const
vbuffer::real_tget_z (const gsgl::index_t &i)
const vbuffer::real_tget_z (const gsgl::index_t &i) const

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

vertex_buffer ( const vbuffer::update_mode mode,
const gsgl::index_t  initial_capacity = 0 
)

Definition at line 137 of file vbuffer.cpp.

~vertex_buffer (  )  [virtual]

Definition at line 143 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.

vbuffer::real_t& get_s ( const gsgl::index_t i  )  [inline]

Definition at line 164 of file vbuffer.hpp.

const vbuffer::real_t& get_s ( const gsgl::index_t i  )  const [inline]

Definition at line 161 of file vbuffer.hpp.

vbuffer::real_t& get_t ( const gsgl::index_t i  )  [inline]

Definition at line 165 of file vbuffer.hpp.

const vbuffer::real_t& get_t ( const gsgl::index_t i  )  const [inline]

Definition at line 162 of file vbuffer.hpp.

gsgl::math::vector get_vector ( const gsgl::index_t i  )  const [inline]

Definition at line 147 of file vbuffer.hpp.

vbuffer::real_t& get_x ( const gsgl::index_t i  )  [inline]

Definition at line 153 of file vbuffer.hpp.

const vbuffer::real_t& get_x ( const gsgl::index_t i  )  const [inline]

Definition at line 149 of file vbuffer.hpp.

vbuffer::real_t& get_y ( const gsgl::index_t i  )  [inline]

Definition at line 154 of file vbuffer.hpp.

const vbuffer::real_t& get_y ( const gsgl::index_t i  )  const [inline]

Definition at line 150 of file vbuffer.hpp.

vbuffer::real_t& get_z ( const gsgl::index_t i  )  [inline]

Definition at line 155 of file vbuffer.hpp.

const vbuffer::real_t& get_z ( const gsgl::index_t i  )  const [inline]

Definition at line 151 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