15 #ifndef RENDERATTRIB_H
16 #define RENDERATTRIB_H
18 #include "pandabase.h"
20 #include "typedWritableReferenceCount.h"
21 #include "renderAttribRegistry.h"
22 #include "pointerTo.h"
23 #include "simpleHashMap.h"
24 #include "lightReMutex.h"
25 #include "pStatCollector.h"
73 virtual bool lower_attrib_can_override()
const;
76 INLINE
bool always_reissue()
const;
78 virtual bool has_cull_callback()
const;
83 INLINE
size_t get_hash()
const;
89 virtual void output(ostream &out)
const;
90 virtual void write(ostream &out,
int indent_level)
const;
92 static int get_num_attribs();
93 static void list_attribs(ostream &out);
94 static int garbage_collect();
95 static bool validate_attribs();
97 virtual int get_slot()
const=0;
99 enum PandaCompareFunc {
180 INLINE
void calc_hash();
184 virtual int compare_to_impl(
const RenderAttrib *other)
const;
185 virtual size_t get_hash_impl()
const;
189 void output_comparefunc(ostream &out, PandaCompareFunc fn)
const;
192 INLINE
static int register_slot(
TypeHandle type_handle,
int sort,
193 RenderAttribRegistry::MakeDefaultFunc *make_default_func);
199 bool _always_reissue;
202 static void init_attribs();
217 static int _garbage_index;
234 static void init_type() {
235 TypedWritableReferenceCount::init_type();
236 register_type(_type_handle,
"RenderAttrib",
237 TypedWritableReferenceCount::get_class_type());
240 return get_class_type();
242 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
248 INLINE ostream &operator << (ostream &out,
const RenderAttrib &attrib) {
253 #include "renderAttrib.I"
This is the base class for a number of render attributes (other than transform) that may be set on sc...
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Base class for objects that can be written to and read from Bam files.
A lightweight reentrant mutex.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This template class implements an unordered map of keys to data, implemented as a hashtable...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
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.
A lightweight class that represents a single element that may be timed and/or counted via stats...
This describes the structure of a single array within a Geom data.
virtual bool unref() const
Explicitly decrements the reference count.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
An STL function object class, this is intended to be used on any ordered collection of class objects ...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...