14#ifndef DEPTHTESTATTRIB_H
15#define DEPTHTESTATTRIB_H
26class EXPCL_PANDA_PGRAPH DepthTestAttrib :
public RenderAttrib {
28 INLINE DepthTestAttrib(PandaCompareFunc mode = M_less);
31 static CPT(RenderAttrib)
make(PandaCompareFunc mode);
34 INLINE PandaCompareFunc
get_mode()
const;
40 virtual void output(std::ostream &out)
const;
43 virtual int compare_to_impl(
const RenderAttrib *other)
const;
44 virtual size_t get_hash_impl()
const;
47 PandaCompareFunc _mode;
50 static int get_class_slot() {
53 virtual int get_slot()
const {
54 return get_class_slot();
56 MAKE_PROPERTY(class_slot, get_class_slot);
59 static void register_with_read_factory();
63 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
64 void fillin(DatagramIterator &scan, BamReader *manager);
67 static TypeHandle get_class_type() {
70 static void init_type() {
71 RenderAttrib::init_type();
73 RenderAttrib::get_class_type());
74 _attrib_slot =
register_slot(_type_handle, 100,
new DepthTestAttrib);
76 virtual TypeHandle get_type()
const {
77 return get_class_type();
79 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
82 static TypeHandle _type_handle;
83 static int _attrib_slot;
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
static ConstPointerTo< RenderAttrib > make(PandaCompareFunc mode)
Constructs a new DepthTestAttrib object.
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.