14#ifndef BUFFERCONTEXT_H
15#define BUFFERCONTEXT_H
38class EXPCL_PANDA_GOBJ BufferContext :
public SavedContext,
private LinkedListNode {
41 virtual ~BufferContext();
62 INLINE BufferContext *
get_next()
const;
68 void set_owning_chain(BufferContextChain *chain);
76 BufferResidencyTracker *_residency;
79 size_t _data_size_bytes;
81 BufferContextChain *_owning_chain;
87 static void init_type() {
88 SavedContext::init_type();
90 SavedContext::get_class_type());
92 virtual TypeHandle get_type()
const {
93 return get_class_type();
95 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
98 static TypeHandle _type_handle;
100 friend class PreparedGraphicsObjects;
101 friend class BufferResidencyTracker;
102 friend class BufferContextChain;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
A table of objects that are saved within the graphics context for reference by handle later.
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
This is a sequence number that increments monotonically.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.