15 #ifndef EGGRENDERMODE_H 16 #define EGGRENDERMODE_H 18 #include "pandabase.h" 19 #include "typedObject.h" 40 EggRenderMode &operator = (
const EggRenderMode ©);
42 void write(ostream &out,
int indent_level)
const;
57 DWM_unspecified, DWM_off, DWM_on
61 DTM_unspecified, DTM_off, DTM_on
65 VM_unspecified, VM_hidden, VM_normal
68 INLINE
void set_alpha_mode(AlphaMode mode);
69 INLINE AlphaMode get_alpha_mode()
const;
71 INLINE
void set_depth_write_mode(DepthWriteMode mode);
72 INLINE DepthWriteMode get_depth_write_mode()
const;
74 INLINE
void set_depth_test_mode(DepthTestMode mode);
75 INLINE DepthTestMode get_depth_test_mode()
const;
77 INLINE
void set_visibility_mode(VisibilityMode mode);
78 INLINE VisibilityMode get_visibility_mode()
const;
80 INLINE
void set_depth_offset(
int bias);
81 INLINE
int get_depth_offset()
const;
82 INLINE
bool has_depth_offset()
const;
83 INLINE
void clear_depth_offset();
85 INLINE
void set_draw_order(
int order);
86 INLINE
int get_draw_order()
const;
87 INLINE
bool has_draw_order()
const;
88 INLINE
void clear_draw_order();
90 INLINE
void set_bin(
const string &bin);
91 INLINE
string get_bin()
const;
92 INLINE
bool has_bin()
const;
93 INLINE
void clear_bin();
96 bool operator == (
const EggRenderMode &other)
const;
97 INLINE
bool operator != (
const EggRenderMode &other)
const;
98 bool operator < (
const EggRenderMode &other)
const;
100 static AlphaMode string_alpha_mode(
const string &
string);
101 static DepthWriteMode string_depth_write_mode(
const string &
string);
102 static DepthTestMode string_depth_test_mode(
const string &
string);
103 static VisibilityMode string_visibility_mode(
const string &
string);
106 AlphaMode _alpha_mode;
107 DepthWriteMode _depth_write_mode;
108 DepthTestMode _depth_test_mode;
109 VisibilityMode _visibility_mode;
111 bool _has_depth_offset;
113 bool _has_draw_order;
121 static void init_type() {
122 register_type(_type_handle,
"EggRenderMode");
129 EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::AlphaMode mode);
130 EXPCL_PANDAEGG istream &operator >> (istream &in, EggRenderMode::AlphaMode &mode);
132 EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::DepthWriteMode mode);
133 EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::DepthTestMode mode);
134 EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::VisibilityMode mode);
136 #include "eggRenderMode.I" This class stores miscellaneous rendering properties that is associated with geometry, and which may be set on the geometry primitive level, on the group above it, or indirectly via a texture.
TypeHandle is the identifier used to differentiate C++ class types.