27class EXPCL_PANDA_PGRAPH ColorBlendAttrib :
public RenderAttrib {
42 O_one_minus_incoming_color,
44 O_one_minus_fbuffer_color,
46 O_one_minus_incoming_alpha,
48 O_one_minus_fbuffer_alpha,
50 O_one_minus_constant_color,
52 O_one_minus_constant_alpha,
53 O_incoming_color_saturate,
58 O_one_minus_incoming1_color,
60 O_one_minus_incoming1_alpha,
70 O_one_minus_color_scale,
72 O_one_minus_alpha_scale,
76 INLINE ColorBlendAttrib();
77 INLINE ColorBlendAttrib(Mode mode, Operand a, Operand b,
78 Mode alpha_mode, Operand alpha_a, Operand alpha_b,
83 static CPT(RenderAttrib)
make(Mode mode);
84 static CPT(RenderAttrib)
make(Mode mode, Operand a, Operand b,
85 const LColor &color = LColor::zero());
86 static CPT(RenderAttrib)
make(Mode rgb_mode, Operand rgb_a, Operand rgb_b,
87 Mode alpha_mode, Operand alpha_a, Operand alpha_b,
88 const LColor &color = LColor::zero());
119 virtual void output(std::ostream &out)
const;
122 virtual int compare_to_impl(
const RenderAttrib *other)
const;
123 virtual size_t get_hash_impl()
const;
129 Operand _alpha_a, _alpha_b;
131 bool _involves_constant_color;
132 bool _involves_color_scale;
135 static int get_class_slot() {
138 virtual int get_slot()
const {
139 return get_class_slot();
141 MAKE_PROPERTY(class_slot, get_class_slot);
144 static void register_with_read_factory();
148 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
149 void fillin(DatagramIterator &scan, BamReader *manager);
152 static TypeHandle get_class_type() {
155 static void init_type() {
156 RenderAttrib::init_type();
158 RenderAttrib::get_class_type());
159 _attrib_slot =
register_slot(_type_handle, 100,
new ColorBlendAttrib);
161 virtual TypeHandle get_type()
const {
162 return get_class_type();
164 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
167 static TypeHandle _type_handle;
168 static int _attrib_slot;
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 ...