28 INLINE
size_t BufferContext::
29 get_data_size_bytes()
const {
30 return _data_size_bytes;
38 get_modified()
const {
46 INLINE
bool BufferContext::
48 return (_residency_state & BufferResidencyTracker::S_active) != 0;
55 INLINE
bool BufferContext::
56 get_resident()
const {
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;
BufferContext * get_next() const
This can be used along with BufferContextChain::get_first() to walk through the list of objects store...
This is a base class for those kinds of SavedContexts that occupy an easily-measured (and substantial...
This class is used to keep track of the current state of all the BufferContexts for a particular grap...
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.
This class maintains a linked list of BufferContexts that might be allocated on the graphics card in ...
void set_resident(bool flag)
Changes the resident flag associated with this object.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
void set_active(bool flag)
Changes the active flag associated with this object.
void update_modified(UpdateSeq new_modified)
Should be called (usually by a derived class) when the modified counter for this object has changed.
This is a sequence number that increments monotonically.