BufferContext

from panda3d.core import BufferContext
class BufferContext

Bases: SavedContext

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.

Inheritance diagram

Inheritance diagram of BufferContext

__init__(*args, **kwargs)
active
data_size_bytes
getActive()

C++ Interface: get_active(BufferContext self)

/**
  • Returns the active flag associated with this object. An object is

  • considered “active” if it was rendered in the current frame.

*/

getClassType()

C++ Interface: get_class_type()

getDataSizeBytes()

C++ Interface: get_data_size_bytes(BufferContext self)

/**
  • 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()

C++ Interface: get_modified(BufferContext self)

/**
  • Returns the UpdateSeq that was recorded the last time mark_loaded() was

  • called.

*/

getResident()

C++ Interface: get_resident(BufferContext self)

/**
  • Returns the resident flag associated with this object. An object is

  • considered “resident” if it appears to be resident in texture memory.

*/

get_active()

C++ Interface: get_active(BufferContext self)

/**
  • Returns the active flag associated with this object. An object is

  • considered “active” if it was rendered in the current frame.

*/

get_class_type()

C++ Interface: get_class_type()

get_data_size_bytes()

C++ Interface: get_data_size_bytes(BufferContext self)

/**
  • 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.

*/

get_modified()

C++ Interface: get_modified(BufferContext self)

/**
  • Returns the UpdateSeq that was recorded the last time mark_loaded() was

  • called.

*/

get_resident()

C++ Interface: get_resident(BufferContext self)

/**
  • Returns the resident flag associated with this object. An object is

  • considered “resident” if it appears to be resident in texture memory.

*/

modified
object
resident
upcastToSavedContext()

C++ Interface: upcast_to_SavedContext(const BufferContext self)

upcast from BufferContext to SavedContext

upcast_to_SavedContext()

C++ Interface: upcast_to_SavedContext(const BufferContext self)

upcast from BufferContext to SavedContext