14#ifndef EGGRENDERMODE_H
15#define EGGRENDERMODE_H
31class EXPCL_PANDA_EGG EggRenderMode {
34 INLINE EggRenderMode(
const EggRenderMode ©);
35 EggRenderMode &operator = (
const EggRenderMode ©);
37 void write(std::ostream &out,
int indent_level)
const;
53 DWM_unspecified, DWM_off, DWM_on
57 DTM_unspecified, DTM_off, DTM_on
61 VM_unspecified, VM_hidden, VM_normal
86 INLINE
void set_bin(
const std::string &bin);
87 INLINE std::string
get_bin()
const;
92 bool operator == (
const EggRenderMode &other)
const;
93 INLINE
bool operator != (
const EggRenderMode &other)
const;
94 bool operator < (
const EggRenderMode &other)
const;
102 AlphaMode _alpha_mode;
103 DepthWriteMode _depth_write_mode;
104 DepthTestMode _depth_test_mode;
105 VisibilityMode _visibility_mode;
107 bool _has_depth_offset;
109 bool _has_draw_order;
117 static void init_type() {
125EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::AlphaMode mode);
126EXPCL_PANDA_EGG std::istream &operator >> (std::istream &in, EggRenderMode::AlphaMode &mode);
128EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthWriteMode mode);
129EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthTestMode mode);
130EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::VisibilityMode mode);
void clear_depth_offset()
Removes the depth-offset flag from this particular object.
bool has_bin() const
Returns true if a bin name has been set for this particular object.
void set_draw_order(int order)
Sets the "draw-order" flag associated with this object.
static DepthWriteMode string_depth_write_mode(const std::string &string)
Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified ...
int get_draw_order() const
Returns the "draw-order" flag as set for this particular object.
static AlphaMode string_alpha_mode(const std::string &string)
Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the...
void write(std::ostream &out, int indent_level) const
Writes the attributes to the indicated output stream in Egg format.
void set_depth_write_mode(DepthWriteMode mode)
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides ...
DepthTestMode get_depth_test_mode() const
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.
DepthWriteMode get_depth_write_mode() const
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.
void set_alpha_mode(AlphaMode mode)
Specifies precisely how the transparency for this geometry should be achieved, or if it should be use...
VisibilityMode get_visibility_mode() const
Returns the visibility mode that was set, or VM_unspecified if nothing was set.
void set_depth_test_mode(DepthTestMode mode)
Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming ...
int get_depth_offset() const
Returns the "depth-offset" flag as set for this particular object.
bool has_draw_order() const
Returns true if the draw-order flag has been set for this particular object.
void clear_draw_order()
Removes the draw-order flag from this particular object.
void set_visibility_mode(VisibilityMode mode)
Specifies whether this geometry is to be considered normally visible, or hidden.
bool has_depth_offset() const
Returns true if the depth-offset flag has been set for this particular object.
static DepthTestMode string_depth_test_mode(const std::string &string)
Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified i...
void set_bin(const std::string &bin)
Sets the "bin" string for this particular object.
static VisibilityMode string_visibility_mode(const std::string &string)
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if th...
std::string get_bin() const
Returns the bin name that has been set for this particular object, if any.
void clear_bin()
Removes the bin name that was set for this particular object.
AlphaMode get_alpha_mode() const
Returns the alpha mode that was set, or AM_unspecified if nothing was set.
void set_depth_offset(int bias)
Sets the "depth-offset" flag associated with this object.
TypeHandle is the identifier used to differentiate C++ class types.
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.