00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef DEPTHTESTATTRIB_H
00016 #define DEPTHTESTATTRIB_H
00017
00018 #include "pandabase.h"
00019
00020 #include "renderAttrib.h"
00021
00022 class FactoryParams;
00023
00024
00025
00026
00027
00028 class EXPCL_PANDA_PGRAPH DepthTestAttrib : public RenderAttrib {
00029 private:
00030 INLINE DepthTestAttrib(PandaCompareFunc mode = M_less);
00031
00032 PUBLISHED:
00033 static CPT(RenderAttrib) make(PandaCompareFunc mode);
00034 static CPT(RenderAttrib) make_default();
00035
00036 INLINE PandaCompareFunc get_mode() const;
00037
00038 public:
00039 virtual void output(ostream &out) const;
00040
00041 protected:
00042 virtual int compare_to_impl(const RenderAttrib *other) const;
00043 virtual size_t get_hash_impl() const;
00044
00045 private:
00046 PandaCompareFunc _mode;
00047
00048 PUBLISHED:
00049 static int get_class_slot() {
00050 return _attrib_slot;
00051 }
00052 virtual int get_slot() const {
00053 return get_class_slot();
00054 }
00055
00056 public:
00057 static void register_with_read_factory();
00058 virtual void write_datagram(BamWriter *manager, Datagram &dg);
00059
00060 protected:
00061 static TypedWritable *make_from_bam(const FactoryParams ¶ms);
00062 void fillin(DatagramIterator &scan, BamReader *manager);
00063
00064 public:
00065 static TypeHandle get_class_type() {
00066 return _type_handle;
00067 }
00068 static void init_type() {
00069 RenderAttrib::init_type();
00070 register_type(_type_handle, "DepthTestAttrib",
00071 RenderAttrib::get_class_type());
00072 _attrib_slot = register_slot(_type_handle, 100, make_default);
00073 }
00074 virtual TypeHandle get_type() const {
00075 return get_class_type();
00076 }
00077 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00078
00079 private:
00080 static TypeHandle _type_handle;
00081 static int _attrib_slot;
00082 };
00083
00084 #include "depthTestAttrib.I"
00085
00086 #endif
00087