Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BufferContext Class Reference

This is a base class for those kinds of SavedContexts that occupy an easily-measured (and substantial) number of bytes in the video card's frame buffer memory or AGP memory. More...

Inheritance diagram for BufferContext:
SavedContext TypedObject IndexBufferContext TextureContext VertexBufferContext

Public Member Functions

bool getActive ()
 Returns the active flag associated with this object. More...
 
int getDataSizeBytes ()
 Returns the number of bytes previously reported for the data object. More...
 
UpdateSeq getModified ()
 Returns the UpdateSeq that was recorded the last time mark_loaded() was called. More...
 
bool getResident ()
 Returns the resident flag associated with this object. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from SavedContext
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 

Public Attributes

bool active
 Returns the active flag associated with this object. More...
 
int data_size_bytes
 Returns the number of bytes previously reported for the data object. More...
 
UpdateSeq modified
 Returns the UpdateSeq that was recorded the last time mark_loaded() was called. More...
 
TypedWritableReferenceCount object
 Returns the associated object. More...
 
bool resident
 Returns the resident flag associated with this object. More...
 
- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 

Detailed Description

This is a base class for those kinds of SavedContexts that occupy an easily-measured (and substantial) number of bytes in the video card's frame buffer memory or AGP memory.

At the present, this includes most of the SavedContext types: VertexBufferContext and IndexBufferContext, as well as TextureContext.

This class provides methods for tracking the video memory utilization, as well as residency of each object, via PStats.

Member Function Documentation

◆ getActive()

bool getActive ( )

Returns the active flag associated with this object.

An object is considered "active" if it was rendered in the current frame.

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getDataSizeBytes()

int getDataSizeBytes ( )

Returns the number of bytes previously reported for the data object.

This is used to track changes in the data object's allocated size; if it changes from this, we need to create a new buffer. This is also used to track memory utilization in PStats.

◆ getModified()

UpdateSeq getModified ( )

Returns the UpdateSeq that was recorded the last time mark_loaded() was called.

◆ getResident()

bool getResident ( )

Returns the resident flag associated with this object.

An object is considered "resident" if it appears to be resident in texture memory.

Member Data Documentation

◆ active

bool active

Returns the active flag associated with this object.

An object is considered "active" if it was rendered in the current frame.

◆ data_size_bytes

int data_size_bytes

Returns the number of bytes previously reported for the data object.

This is used to track changes in the data object's allocated size; if it changes from this, we need to create a new buffer. This is also used to track memory utilization in PStats.

◆ modified

UpdateSeq modified

Returns the UpdateSeq that was recorded the last time mark_loaded() was called.

◆ object

Returns the associated object.

◆ resident

bool resident

Returns the resident flag associated with this object.

An object is considered "resident" if it appears to be resident in texture memory.