Panda3D
Public Member Functions | Friends
BufferResidencyTracker Class Reference

This class is used to keep track of the current state of all the BufferContexts for a particular graphics context: whether each one is active (rendered this frame) or inactive (not rendered this frame), and whether it is resident or nonresident in video memory. More...

#include "bufferResidencyTracker.h"

List of all members.

Public Member Functions

 BufferResidencyTracker (const string &pgo_name, const string &type_name)
void begin_frame (Thread *current_thread)
 To be called at the beginning of a frame, this initializes the active/inactive status.
void end_frame (Thread *current_thread)
 To be called at the end of a frame, this updates the PStatCollectors appropriately.
BufferContextChainget_active_nonresident ()
BufferContextChainget_active_resident ()
BufferContextChainget_inactive_nonresident ()
BufferContextChainget_inactive_resident ()
void set_levels ()
 Resets the pstats levels to their appropriate values, possibly in the middle of a frame.
void write (ostream &out, int indent_level) const

Friends

class BufferContext

Detailed Description

This class is used to keep track of the current state of all the BufferContexts for a particular graphics context: whether each one is active (rendered this frame) or inactive (not rendered this frame), and whether it is resident or nonresident in video memory.

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

Definition at line 36 of file bufferResidencyTracker.h.


Member Function Documentation

void BufferResidencyTracker::begin_frame ( Thread current_thread)

To be called at the beginning of a frame, this initializes the active/inactive status.

Definition at line 58 of file bufferResidencyTracker.cxx.

References ClockObject::get_frame_count(), and ClockObject::get_global_clock().

Referenced by PreparedGraphicsObjects::begin_frame().

void BufferResidencyTracker::end_frame ( Thread current_thread)

To be called at the end of a frame, this updates the PStatCollectors appropriately.

Definition at line 79 of file bufferResidencyTracker.cxx.

Referenced by PreparedGraphicsObjects::end_frame().

Resets the pstats levels to their appropriate values, possibly in the middle of a frame.

Definition at line 93 of file bufferResidencyTracker.cxx.

Referenced by PreparedGraphicsObjects::release_all().


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