#include <vbuffer.hpp>
Definition at line 99 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. | |
vbuffer_mixin (const int &target, const int &gl_mode, const gsgl::index_t initial_capacity=0) | |
virtual | ~vbuffer_mixin () |
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 |
Private Attributes | |
gsgl::data::simple_array< T > | buffer |
vbuffer_mixin | ( | const int & | target, | |
const int & | gl_mode, | |||
const gsgl::index_t | initial_capacity = 0 | |||
) | [inline] |
Definition at line 105 of file vbuffer.hpp.
virtual ~vbuffer_mixin | ( | ) | [inline, virtual] |
Definition at line 107 of file vbuffer.hpp.
void append | ( | const T & | t | ) | [inline] |
Definition at line 112 of file vbuffer.hpp.
Referenced by clipmap_ring::init(), and simple_sphere::simple_sphere().
void bind | ( | ) | [inherited] |
Binds the buffer object for use with OpenGL.
Definition at line 78 of file vbuffer.cpp.
References vbuffer_base::buffer_size(), CHECK_GL_ERRORS, vbuffer_base::element_size(), vbuffer_base::get_ptr(), vbuffer_base::gl_mode, vbuffer_base::highest_dirty_index, vbuffer_base::load(), vbuffer_base::lowest_dirty_index, vbuffer_base::opengl_id, vbuffer_base::prev_size, and vbuffer_base::target.
Referenced by checkered_box::draw(), simple_sphere::draw(), stellar_db::draw(), clipmap_ring::draw(), and submesh::draw().
virtual gsgl::index_t buffer_size | ( | ) | [inline, protected, virtual] |
virtual size_t element_size | ( | ) | [inline, protected, virtual] |
gsgl::data::simple_array<T>& get_buffer | ( | ) | [inline] |
Definition at line 109 of file vbuffer.hpp.
virtual void* get_ptr | ( | ) | [inline, protected, virtual] |
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] |
Definition at line 115 of file vbuffer.hpp.
const T& operator[] | ( | const gsgl::index_t & | i | ) | const [inline] |
Definition at line 114 of file vbuffer.hpp.
gsgl::index_t size | ( | ) | const [inline] |
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().
gsgl::data::simple_array<T> buffer [private] |
Definition at line 102 of file vbuffer.hpp.
Referenced by vbuffer_mixin< unsigned int >::append(), vbuffer_mixin< unsigned int >::buffer_size(), vbuffer_mixin< unsigned int >::get_buffer(), vbuffer_mixin< unsigned int >::get_ptr(), vbuffer_mixin< unsigned int >::operator[](), and vbuffer_mixin< unsigned int >::size().
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[]().