14#ifndef AUXBITPLANEATTRIB_H
15#define AUXBITPLANEATTRIB_H
49class EXPCL_PANDA_PGRAPH AuxBitplaneAttrib :
public RenderAttrib {
51 INLINE AuxBitplaneAttrib(
int outputs);
54 enum AuxBitplaneOutput {
60 static CPT(RenderAttrib)
make();
61 static CPT(RenderAttrib)
make(
int outputs);
70 virtual void output(std::ostream &out)
const;
73 virtual int compare_to_impl(
const RenderAttrib *other)
const;
74 virtual size_t get_hash_impl()
const;
79 static CPT(RenderAttrib) _default;
82 static int get_class_slot() {
85 virtual int get_slot()
const {
86 return get_class_slot();
88 MAKE_PROPERTY(class_slot, get_class_slot);
91 static void register_with_read_factory();
95 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
96 void fillin(DatagramIterator &scan, BamReader *manager);
99 static TypeHandle get_class_type() {
102 static void init_type() {
103 RenderAttrib::init_type();
105 RenderAttrib::get_class_type());
106 _attrib_slot =
register_slot(_type_handle, 100,
new AuxBitplaneAttrib(0));
108 virtual TypeHandle get_type()
const {
109 return get_class_type();
111 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
114 static TypeHandle _type_handle;
115 static int _attrib_slot;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_outputs
Returns the AuxBitplaneAttrib output bits.
static ConstPointerTo< RenderAttrib > make()
Constructs a default AuxBitplaneAttrib object.
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
static int register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
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.