#include <buffer_pool.hpp>
Definition at line 48 of file buffer_pool.hpp.
Public Member Functions | |
object_record | allocate_object () |
buffer_pool (const vbuffer::update_mode &mode, const gsgl::index_t &num_objects_per_bucket, const gsgl::index_t &num_vertices_per_object, const gsgl::index_t &num_indices_per_object) | |
void | free_object (const object_record &) |
void | load () |
void | unload () |
virtual | ~buffer_pool () |
Private Attributes | |
data::simple_stack< object_record > | available_objects |
data::simple_array< bucket * > | buckets |
const vbuffer::update_mode | mode |
const gsgl::index_t | num_indices_per_object |
const gsgl::index_t | num_objects_per_bucket |
const gsgl::index_t | num_vertices_per_object |
Classes | |
struct | bucket |
struct | object_record |
buffer_pool | ( | const vbuffer::update_mode & | mode, | |
const gsgl::index_t & | num_objects_per_bucket, | |||
const gsgl::index_t & | num_vertices_per_object, | |||
const gsgl::index_t & | num_indices_per_object | |||
) |
Definition at line 45 of file buffer_pool.cpp.
~buffer_pool | ( | ) | [virtual] |
buffer_pool::object_record allocate_object | ( | ) |
Definition at line 59 of file buffer_pool.cpp.
References buffer_pool::available_objects, buffer_pool::free_object(), buffer_pool::mode, buffer_pool::num_indices_per_object, buffer_pool::num_objects_per_bucket, buffer_pool::num_vertices_per_object, buffer_pool::object_record::parent, buffer_pool::object_record::pos_in_indices, and buffer_pool::object_record::pos_in_vertices.
Referenced by sph_qt_node::sph_qt_node().
void free_object | ( | const object_record & | obj | ) |
Definition at line 92 of file buffer_pool.cpp.
References buffer_pool::available_objects.
Referenced by buffer_pool::allocate_object(), and sph_qt_node::~sph_qt_node().
void load | ( | ) |
void unload | ( | ) |
Definition at line 108 of file buffer_pool.cpp.
References buffer_pool::buckets.
Referenced by spherical_quadtree::cleanup().
data::simple_stack<object_record> available_objects [private] |
Definition at line 79 of file buffer_pool.hpp.
Referenced by buffer_pool::allocate_object(), and buffer_pool::free_object().
data::simple_array<bucket *> buckets [private] |
Definition at line 78 of file buffer_pool.hpp.
Referenced by buffer_pool::load(), buffer_pool::unload(), and buffer_pool::~buffer_pool().
const vbuffer::update_mode mode [private] |
const gsgl::index_t num_indices_per_object [private] |
const gsgl::index_t num_objects_per_bucket [private] |
const gsgl::index_t num_vertices_per_object [private] |