Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
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"

Public Member Functions

 BufferResidencyTracker (const std::string &pgo_name, const std::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 (std::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 32 of file bufferResidencyTracker.h.

Constructor & Destructor Documentation

◆ BufferResidencyTracker()

BufferResidencyTracker::BufferResidencyTracker ( const std::string & pgo_name,
const std::string & type_name )

Definition at line 24 of file bufferResidencyTracker.cxx.

◆ ~BufferResidencyTracker()

BufferResidencyTracker::~BufferResidencyTracker ( )

Definition at line 38 of file bufferResidencyTracker.cxx.

Member Function Documentation

◆ begin_frame()

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 50 of file bufferResidencyTracker.cxx.

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

Referenced by PreparedGraphicsObjects::begin_frame().

◆ end_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 69 of file bufferResidencyTracker.cxx.

Referenced by PreparedGraphicsObjects::end_frame().

◆ get_active_nonresident()

BufferContextChain & BufferResidencyTracker::get_active_nonresident ( )
inline

Definition at line 25 of file bufferResidencyTracker.I.

◆ get_active_resident()

BufferContextChain & BufferResidencyTracker::get_active_resident ( )
inline

Definition at line 41 of file bufferResidencyTracker.I.

◆ get_inactive_nonresident()

BufferContextChain & BufferResidencyTracker::get_inactive_nonresident ( )
inline

Definition at line 17 of file bufferResidencyTracker.I.

◆ get_inactive_resident()

BufferContextChain & BufferResidencyTracker::get_inactive_resident ( )
inline

Definition at line 33 of file bufferResidencyTracker.I.

◆ set_levels()

void BufferResidencyTracker::set_levels ( )

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

Definition at line 81 of file bufferResidencyTracker.cxx.

Referenced by PreparedGraphicsObjects::release_all().

◆ write()

void BufferResidencyTracker::write ( std::ostream & out,
int indent_level ) const

Definition at line 92 of file bufferResidencyTracker.cxx.

Friends And Related Symbol Documentation

◆ BufferContext

friend class BufferContext
friend

Definition at line 83 of file bufferResidencyTracker.h.


The documentation for this class was generated from the following files: