14#ifndef DEPTHWRITEATTRIB_H
15#define DEPTHWRITEATTRIB_H
26class EXPCL_PANDA_PGRAPH DepthWriteAttrib :
public RenderAttrib {
34 INLINE DepthWriteAttrib(Mode mode = M_on);
37 static CPT(RenderAttrib)
make(Mode mode);
46 virtual void output(std::ostream &out)
const;
49 virtual int compare_to_impl(
const RenderAttrib *other)
const;
50 virtual size_t get_hash_impl()
const;
56 static int get_class_slot() {
59 virtual int get_slot()
const {
60 return get_class_slot();
62 MAKE_PROPERTY(class_slot, get_class_slot);
65 static void register_with_read_factory();
69 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
70 void fillin(DatagramIterator &scan, BamReader *manager);
73 static TypeHandle get_class_type() {
76 static void init_type() {
77 RenderAttrib::init_type();
79 RenderAttrib::get_class_type());
80 _attrib_slot =
register_slot(_type_handle, 100,
new DepthWriteAttrib);
82 virtual TypeHandle get_type()
const {
83 return get_class_type();
85 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
88 static TypeHandle _type_handle;
89 static int _attrib_slot;
static ConstPointerTo< RenderAttrib > make(Mode mode)
Constructs a new DepthWriteAttrib object.
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
get_mode
Returns the depth write mode.
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.
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.