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 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 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 ...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A lightweight reentrant mutex.
A lightweight class that represents a single element that may be timed and/or counted via stats.
virtual bool unref() const
Explicitly decrements the reference count.
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...
This template class implements an unordered map of keys to data, implemented as a hashtable.
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.
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.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
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.