14 #ifndef RENDERATTRIB_H 15 #define RENDERATTRIB_H 64 virtual bool lower_attrib_can_override()
const;
67 virtual bool has_cull_callback()
const;
72 INLINE
size_t get_hash()
const;
75 virtual bool unref()
const final;
77 virtual void output(std::ostream &out)
const;
78 virtual void write(std::ostream &out,
int indent_level)
const;
80 static int get_num_attribs();
81 static void list_attribs(std::ostream &out);
82 static int garbage_collect();
83 static bool validate_attribs();
85 virtual int get_slot()
const=0;
86 MAKE_PROPERTY(slot, get_slot);
88 enum PandaCompareFunc {
165 INLINE
void calc_hash();
169 virtual int compare_to_impl(
const RenderAttrib *other)
const;
170 virtual size_t get_hash_impl()
const;
173 void output_comparefunc(std::ostream &out, PandaCompareFunc fn)
const;
176 INLINE
static int register_slot(
TypeHandle type_handle,
int sort,
183 static void init_attribs();
196 static size_t _garbage_index;
215 static void init_type() {
216 TypedWritableReferenceCount::init_type();
218 TypedWritableReferenceCount::get_class_type());
221 return get_class_type();
223 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
229 INLINE std::ostream &operator << (std::ostream &out,
const RenderAttrib &attrib) {
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.
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.
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A lightweight class that represents a single element that may be timed and/or counted via stats.
This class is used to associate each RenderAttrib with a different slot index at runtime,...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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,...
virtual bool unref() const
Explicitly decrements the reference count.