BufferContext

from acron.core import BufferContext
class BufferContext

Bases:

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

digraph inheritancee2226708c6 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "BufferContext" [URL="acron.core.BufferContext.html#acron.core.BufferContext",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "SavedContext" -> "BufferContext" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "SavedContext" [URL="acron.core.SavedContext.html#acron.core.SavedContext",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "SavedContext" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; }
property active → bool

Returns the active flag associated with this object. An object is considered “active” if it was rendered in the current frame.

property data_size_bytes → int

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_active()

Returns the active flag associated with this object. An object is considered “active” if it was rendered in the current frame.

static get_class_type()
get_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.

get_modified()

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

get_resident()

Returns the resident flag associated with this object. An object is considered “resident” if it appears to be resident in texture memory.

property modified → UpdateSeq

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

property object → TypedWritableReferenceCount

Returns the associated object.

property resident → bool

Returns the resident flag associated with this object. An object is considered “resident” if it appears to be resident in texture memory.