66 INLINE
size_t get_hash()
const;
68 INLINE
bool is_empty()
const;
70 INLINE
bool has_cull_callback()
const;
90 int num_attribs,
int override = 0);
101 CPT(
RenderState) adjust_all_priorities(
int adjustment)
const;
103 INLINE
bool has_attrib(
TypeHandle type)
const;
104 INLINE
bool has_attrib(
int slot)
const;
106 ALWAYS_INLINE
const RenderAttrib *get_attrib(
int slot)
const;
107 INLINE
const RenderAttrib *get_attrib_def(
int slot)
const;
108 INLINE
int get_override(
TypeHandle type)
const;
109 INLINE
int get_override(
int slot)
const;
111 MAKE_MAP_PROPERTY(attribs, has_attrib, get_attrib);
122 INLINE
size_t get_composition_cache_num_entries()
const;
123 INLINE
size_t get_invert_composition_cache_num_entries()
const;
125 INLINE
size_t get_composition_cache_size()
const;
126 INLINE
const RenderState *get_composition_cache_source(
size_t n)
const;
127 INLINE
const RenderState *get_composition_cache_result(
size_t n)
const;
128 INLINE
size_t get_invert_composition_cache_size()
const;
129 INLINE
const RenderState *get_invert_composition_cache_source(
size_t n)
const;
130 INLINE
const RenderState *get_invert_composition_cache_result(
size_t n)
const;
131 EXTENSION(PyObject *get_composition_cache()
const);
132 EXTENSION(PyObject *get_invert_composition_cache()
const);
134 void output(std::ostream &out)
const;
135 void write(std::ostream &out,
int indent_level)
const;
137 static int get_max_priority();
139 static int get_num_states();
140 static int get_num_unused_states();
141 static int clear_cache();
142 static void clear_munger_cache();
143 static int garbage_collect();
144 static void list_cycles(std::ostream &out);
145 static void list_states(std::ostream &out);
146 static bool validate_states();
147 EXTENSION(
static PyObject *get_states());
148 EXTENSION(
static PyObject *get_unused_states());
153 INLINE
int get_draw_order()
const;
154 INLINE
int get_bin_index()
const;
155 int get_geom_rendering(
int geom_rendering)
const;
158 static void bin_removed(
int bin_index);
160 INLINE
static void flush_level();
163 template<
class AttribType>
164 INLINE
bool get_attrib(
const AttribType *&attrib)
const;
165 template<
class AttribType>
166 INLINE
bool get_attrib(CPT(AttribType) &attrib)
const;
167 template<
class AttribType>
168 INLINE
void get_attrib_def(
const AttribType *&attrib)
const;
169 template<
class AttribType>
170 INLINE
void get_attrib_def(CPT(AttribType) &attrib)
const;
176 INLINE
void cache_unref_only()
const;
179 INLINE
void check_hash()
const;
180 bool validate_filled_slots()
const;
181 INLINE
bool do_cache_unref()
const;
182 INLINE
bool do_node_unref()
const;
183 INLINE
void calc_hash();
186 class CompositionCycleDescEntry {
188 INLINE CompositionCycleDescEntry(
const RenderState *obj,
202 void detect_and_break_cycles();
203 static bool r_detect_cycles(
const RenderState *start_state,
206 CompositionCycleDesc *cycle_desc);
207 static bool r_detect_reverse_cycles(
const RenderState *start_state,
210 CompositionCycleDesc *cycle_desc);
213 void remove_cache_pointers();
215 void determine_bin_index();
216 void determine_cull_callback();
219 INLINE
void set_destructing();
220 INLINE
bool is_destructing()
const;
222 INLINE
void consider_update_pstats(
int old_referenced_bits)
const;
223 static void update_pstats(
int old_referenced_bits,
int new_referenced_bits);
226 static void init_states();
241 static States *_states;
256 INLINE Composition();
257 INLINE Composition(
const Composition ©);
269 CompositionCache _composition_cache;
270 CompositionCache _invert_composition_cache;
278 mutable Mungers _mungers;
279 mutable int _last_mi;
284 mutable MungedStates _munged_states;
292 static size_t _garbage_index;
309 INLINE Attribute(
const RenderAttrib *attrib,
int override);
310 INLINE Attribute(
int override = 0);
311 INLINE Attribute(
const Attribute ©);
312 INLINE
void operator = (
const Attribute ©);
313 INLINE
void set(
const RenderAttrib *attrib,
int override);
314 INLINE
int compare_to(
const Attribute &other)
const;
319 Attribute _attributes[RenderAttribRegistry::_max_slots];
323 SlotMask _filled_slots;
332 F_checked_bin_index = 0x000001,
333 F_checked_cull_callback = 0x000002,
334 F_has_cull_callback = 0x000004,
335 F_is_destructing = 0x000008,
336 F_hash_known = 0x000010,
340 vector_int *_read_overrides;
348 static void register_with_read_factory();
362 static void init_type() {
363 NodeCachedReferenceCount::init_type();
365 NodeCachedReferenceCount::get_class_type());
368 return get_class_type();
370 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
386 INLINE std::ostream &operator << (std::ostream &out,
const RenderState &state) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is used to track the utilization of the TransformState and RenderState caches,...
void cache_ref() const
Explicitly increments the cache reference count and the normal reference count simultaneously.
bool cache_unref() const
Explicitly decrements the cache reference count and the normal reference count simultaneously.
void cache_ref_only() const
Decrements the cache reference count without affecting the normal reference count.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
The default class template does not define any methods.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Objects of this class are used to convert vertex data from a Geom into a format suitable for passing ...
Encapsulates all the communication with a particular instance of a given rendering backend.
This is a standard, non-reentrant mutex, similar to the Mutex class.
A lightweight reentrant mutex.
This class further specializes CachedTypedWritableReferenceCount to also add a node_ref_count,...
bool node_unref() const
Explicitly decrements the node reference count and the normal reference count simultaneously.
void node_ref() const
Explicitly increments the reference count.
A lightweight class that represents a single element that may be timed and/or counted via stats.
This is the base class for PointerTo and ConstPointerTo.
This class is used to associate each RenderAttrib with a different slot index at runtime,...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
virtual bool unref() const
Explicitly decrements the reference count.
This template class implements an unordered map of keys to data, implemented as a hashtable.
This is just a simple derivative of GeomMunger that adds the ability to munge states.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is a sequence number that increments monotonically.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
This is the default hash_compare class, which assumes the Key is a size_t value or can be implicitly ...
This is our own Panda specialization on the default STL list.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.