Panda3D
|
A collection of VertexDataPages, which can be used to allocate new VertexDataBlock objects. More...
#include "vertexDataBook.h"
Public Member Functions | |
VertexDataBook (size_t block_size) | |
VertexDataBlock * | alloc (size_t size) |
Allocates and returns a new VertexDataBuffer of the requested size. More... | |
size_t | count_allocated_size () const |
Returns the total size of all bytes allocated within pages owned by this book. More... | |
size_t | count_allocated_size (VertexDataPage::RamClass ram_class) const |
Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class. More... | |
size_t | count_total_page_size () const |
Returns the total size of all bytes owned by all pages owned by this book. More... | |
size_t | count_total_page_size (VertexDataPage::RamClass ram_class) const |
Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class. More... | |
int | get_num_pages () const |
Returns the number of pages created for the book. More... | |
void | reorder_page (VertexDataPage *page) |
void | save_to_disk () |
Writes all pages to disk immediately, just in case they get evicted later. More... | |
Friends | |
class | VertexDataPage |
A collection of VertexDataPages, which can be used to allocate new VertexDataBlock objects.
Definition at line 32 of file vertexDataBook.h.
|
inline |
Allocates and returns a new VertexDataBuffer of the requested size.
Definition at line 23 of file vertexDataBook.I.
References get_num_pages().
Referenced by VertexDataBuffer::swap().
size_t VertexDataBook::count_allocated_size | ( | ) | const |
Returns the total size of all bytes allocated within pages owned by this book.
Definition at line 85 of file vertexDataBook.cxx.
Referenced by count_total_page_size().
size_t VertexDataBook::count_allocated_size | ( | VertexDataPage::RamClass | ram_class | ) | const |
Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class.
Definition at line 104 of file vertexDataBook.cxx.
References save_to_disk().
size_t VertexDataBook::count_total_page_size | ( | ) | const |
Returns the total size of all bytes owned by all pages owned by this book.
Definition at line 46 of file vertexDataBook.cxx.
size_t VertexDataBook::count_total_page_size | ( | VertexDataPage::RamClass | ram_class | ) | const |
Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class.
Definition at line 65 of file vertexDataBook.cxx.
References count_allocated_size().
|
inline |
Returns the number of pages created for the book.
Definition at line 34 of file vertexDataBook.I.
Referenced by alloc().
void VertexDataBook::save_to_disk | ( | ) |
Writes all pages to disk immediately, just in case they get evicted later.
It makes sense to make this call just before taking down a loading screen, to minimize chugs from saving pages inadvertently later.
Definition at line 126 of file vertexDataBook.cxx.
Referenced by count_allocated_size().