Panda3D
Public Member Functions | Private Member Functions | Private Attributes | Friends

BufferContextChain Class Reference

This class maintains a linked list of BufferContexts that might be allocated on the graphics card in some context. More...

#include "bufferContextChain.h"

Inheritance diagram for BufferContextChain:
LinkedListNode

List of all members.

Public Member Functions

int get_count () const
 Returns the total number of BufferContexts currently assigned to this tracker.
BufferContextget_first ()
 Returns the first BufferContext object stored in the tracker.
size_t get_total_size () const
 Returns the total number of bytes represented by the BufferContexts currently assigned to this tracker.
void take_from (BufferContextChain &other)
 Moves all of the BufferContexts from the other tracker onto this one.
void write (ostream &out, int indent_level) const

Private Member Functions

void insert_after (LinkedListNode *node)
 Adds a LinkedListNode record after the indicated node in the doubly-linked list.
void insert_before (LinkedListNode *node)
 Adds a LinkedListNode record before the indicated node in the doubly-linked list.
bool is_on_list () const
 Returns true if the node is member of any list, false if it has been removed or never added.
void remove_from_list ()
 Removes a LinkedListNode record from the doubly-linked list.
void take_list_from (LinkedListNode *other_root)
 Given that this LinkedListNode represents the root of a list, and the other pointer represents the root of a different list, move all of the nodes (except the root itself) from other_root onto this list.

Private Attributes

LinkedListNode_next
LinkedListNode_prev

Friends

class BufferContext

Detailed Description

This class maintains a linked list of BufferContexts that might be allocated on the graphics card in some context.

There is a different BufferContextChain for resident textures, active textures, evicted textures, etc.

The primary purpose of this class is to facilitate PStats reporting of graphics memory usage.

Definition at line 34 of file bufferContextChain.h.


Member Function Documentation

int BufferContextChain::get_count ( ) const [inline]

Returns the total number of BufferContexts currently assigned to this tracker.

Definition at line 57 of file bufferContextChain.I.

BufferContext * BufferContextChain::get_first ( )

Returns the first BufferContext object stored in the tracker.

You can walk through the entire list of objects stored on the tracker by calling get_next() on each returned object, until the return value is NULL.

Definition at line 29 of file bufferContextChain.cxx.

size_t BufferContextChain::get_total_size ( ) const [inline]

Returns the total number of bytes represented by the BufferContexts currently assigned to this tracker.

Definition at line 46 of file bufferContextChain.I.

void BufferContextChain::take_from ( BufferContextChain other)

Moves all of the BufferContexts from the other tracker onto this one.

Definition at line 46 of file bufferContextChain.cxx.

References LinkedListNode::take_list_from().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations