#include <vbuffer.hpp>
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 |
vbuffer_base | ( | const int & | target, | |
const int & | mode | |||
) |
Definition at line 47 of file vbuffer.cpp.
~vbuffer_base | ( | ) | [virtual] |
void bind | ( | ) |
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 | ( | ) | [protected, pure virtual] |
Implemented in vbuffer_mixin, vbuffer_mixin< float >, and vbuffer_mixin< unsigned int >.
Referenced by vbuffer_base::bind().
virtual size_t element_size | ( | ) | [protected, pure virtual] |
Implemented in vbuffer_mixin, vbuffer_mixin< float >, and vbuffer_mixin< unsigned int >.
Referenced by vbuffer_base::bind().
virtual void* get_ptr | ( | ) | [protected, pure virtual] |
Implemented in vbuffer_mixin, vbuffer_mixin< float >, and vbuffer_mixin< unsigned int >.
Referenced by vbuffer_base::bind().
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().
const int gl_mode [private] |
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] |
const int target [private] |
Definition at line 72 of file vbuffer.hpp.
Referenced by vbuffer_base::bind(), and vbuffer_base::unbind().