Panda3D
Public Member Functions | List of all members
VertexDataBook Class Reference

A collection of VertexDataPages, which can be used to allocate new VertexDataBlock objects. More...

Public Member Functions

 __init__ (size_t block_size)
 
VertexDataBlock alloc (size_t size)
 Allocates and returns a new VertexDataBuffer of the requested size. More...
 
size_t countAllocatedSize ()
 Returns the total size of all bytes allocated within pages owned by this book. More...
 
size_t countAllocatedSize (VertexDataPage::RamClass ram_class)
 Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class. More...
 
size_t countTotalPageSize ()
 Returns the total size of all bytes owned by all pages owned by this book. More...
 
size_t countTotalPageSize (VertexDataPage::RamClass ram_class)
 Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class. More...
 
int getNumPages ()
 Returns the number of pages created for the book. More...
 
 saveToDisk ()
 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. More...
 

Detailed Description

A collection of VertexDataPages, which can be used to allocate new VertexDataBlock objects.

Member Function Documentation

◆ __init__()

__init__ ( size_t  block_size)

◆ alloc()

VertexDataBlock alloc ( size_t  size)

Allocates and returns a new VertexDataBuffer of the requested size.

◆ countAllocatedSize() [1/2]

size_t countAllocatedSize ( )

Returns the total size of all bytes allocated within pages owned by this book.

◆ countAllocatedSize() [2/2]

size_t countAllocatedSize ( VertexDataPage::RamClass  ram_class)

Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class.

◆ countTotalPageSize() [1/2]

size_t countTotalPageSize ( )

Returns the total size of all bytes owned by all pages owned by this book.

◆ countTotalPageSize() [2/2]

size_t countTotalPageSize ( VertexDataPage::RamClass  ram_class)

Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class.

◆ getNumPages()

int getNumPages ( )

Returns the number of pages created for the book.

◆ saveToDisk()

saveToDisk ( )

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.