30 return _data_size_bytes;
48 return (_residency_state & BufferResidencyTracker::S_active) != 0;
57 return (_residency_state & BufferResidencyTracker::S_resident) != 0;
67 _residency_state |= BufferResidencyTracker::S_active;
69 _residency_state |= BufferResidencyTracker::S_resident;
73 set_owning_chain(&_residency->_chains[_residency_state]);
83 _residency_state |= BufferResidencyTracker::S_resident;
87 set_owning_chain(&_residency->_chains[_residency_state]);
96 nassertr(_owning_chain !=
nullptr,
nullptr);
109 if (_owning_chain !=
nullptr) {
110 _owning_chain->adjust_bytes((
int)new_data_size_bytes - (
int)_data_size_bytes);
112 _data_size_bytes = new_data_size_bytes;
121 _modified = new_modified;
This class maintains a linked list of BufferContexts that might be allocated on the graphics card in ...
This is a base class for those kinds of SavedContexts that occupy an easily-measured (and substantial...
get_active
Returns the active flag associated with this object.
void update_data_size_bytes(size_t new_data_size_bytes)
Should be called (usually by a derived class) when the on-card size of this object has changed.
void set_active(bool flag)
Changes the active flag associated with this object.
get_object
Returns the associated object.
get_resident
Returns the resident flag associated with this object.
get_modified
Returns the UpdateSeq that was recorded the last time mark_loaded() was called.
void set_resident(bool flag)
Changes the resident flag associated with this object.
get_data_size_bytes
Returns the number of bytes previously reported for the data object.
void update_modified(UpdateSeq new_modified)
Should be called (usually by a derived class) when the modified counter for this object has changed.
BufferContext * get_next() const
This can be used along with BufferContextChain::get_first() to walk through the list of objects store...
This class is used to keep track of the current state of all the BufferContexts for a particular grap...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
This is a sequence number that increments monotonically.