90 CS_constant_color_scale,
97 CO_one_minus_src_color,
99 CO_one_minus_src_alpha,
102 INLINE
void set_name(
const std::string &name);
103 INLINE
const std::string &get_name()
const;
105 INLINE
void set_sort(
int sort);
106 INLINE
int get_sort()
const;
108 INLINE
void set_priority(
int priority);
109 INLINE
int get_priority()
const;
112 INLINE
void set_texcoord_name(
const std::string &texcoord_name);
117 INLINE
void set_mode(Mode mode);
118 INLINE Mode get_mode()
const;
120 INLINE
bool is_fixed_function()
const;
122 INLINE
void set_color(
const LColor &color);
123 INLINE LColor get_color()
const;
125 INLINE
void set_rgb_scale(
int rgb_scale);
126 INLINE
int get_rgb_scale()
const;
128 INLINE
void set_alpha_scale(
int alpha_scale);
129 INLINE
int get_alpha_scale()
const;
131 INLINE
void set_saved_result(
bool saved_result);
132 INLINE
bool get_saved_result()
const;
134 INLINE
void set_tex_view_offset(
int tex_view_offset);
135 INLINE
int get_tex_view_offset()
const;
137 INLINE
void set_combine_rgb(CombineMode mode,
138 CombineSource source0, CombineOperand operand0);
139 INLINE
void set_combine_rgb(CombineMode mode,
140 CombineSource source0, CombineOperand operand0,
141 CombineSource source1, CombineOperand operand1);
142 INLINE
void set_combine_rgb(CombineMode mode,
143 CombineSource source0, CombineOperand operand0,
144 CombineSource source1, CombineOperand operand1,
145 CombineSource source2, CombineOperand operand2);
146 INLINE CombineMode get_combine_rgb_mode()
const;
147 INLINE
int get_num_combine_rgb_operands()
const;
148 INLINE CombineSource get_combine_rgb_source0()
const;
149 INLINE CombineOperand get_combine_rgb_operand0()
const;
150 INLINE CombineSource get_combine_rgb_source1()
const;
151 INLINE CombineOperand get_combine_rgb_operand1()
const;
152 INLINE CombineSource get_combine_rgb_source2()
const;
153 INLINE CombineOperand get_combine_rgb_operand2()
const;
155 INLINE
void set_combine_alpha(CombineMode mode,
156 CombineSource source0, CombineOperand operand0);
157 INLINE
void set_combine_alpha(CombineMode mode,
158 CombineSource source0, CombineOperand operand0,
159 CombineSource source1, CombineOperand operand1);
160 INLINE
void set_combine_alpha(CombineMode mode,
161 CombineSource source0, CombineOperand operand0,
162 CombineSource source1, CombineOperand operand1,
163 CombineSource source2, CombineOperand operand2);
164 INLINE CombineMode get_combine_alpha_mode()
const;
165 INLINE
int get_num_combine_alpha_operands()
const;
166 INLINE CombineSource get_combine_alpha_source0()
const;
167 INLINE CombineOperand get_combine_alpha_operand0()
const;
168 INLINE CombineSource get_combine_alpha_source1()
const;
169 INLINE CombineOperand get_combine_alpha_operand1()
const;
170 INLINE CombineSource get_combine_alpha_source2()
const;
171 INLINE CombineOperand get_combine_alpha_operand2()
const;
173 INLINE
bool involves_color_scale()
const;
174 INLINE
bool uses_color()
const;
175 INLINE
bool uses_primary_color()
const;
176 INLINE
bool uses_last_saved_result()
const;
178 INLINE
bool operator == (
const TextureStage &other)
const;
179 INLINE
bool operator != (
const TextureStage &other)
const;
180 INLINE
bool operator < (
const TextureStage &other)
const;
184 void write(std::ostream &out)
const;
185 void write(std::ostream &out,
int indent_level)
const;
186 void output(std::ostream &out)
const;
191 MAKE_PROPERTY(name, get_name, set_name);
192 MAKE_PROPERTY(sort, get_sort, set_sort);
193 MAKE_PROPERTY(priority, get_priority, set_priority);
195 MAKE_PROPERTY(texcoord_name, get_texcoord_name, set_texcoord_name);
196 MAKE_PROPERTY(tangent_name, get_tangent_name);
197 MAKE_PROPERTY(binormal_name, get_binormal_name);
199 MAKE_PROPERTY(mode, get_mode, set_mode);
201 MAKE_PROPERTY(color, get_color, set_color);
202 MAKE_PROPERTY(rgb_scale, get_rgb_scale, set_rgb_scale);
203 MAKE_PROPERTY(alpha_scale, get_alpha_scale, set_alpha_scale);
204 MAKE_PROPERTY(saved_result, get_saved_result, set_saved_result);
206 MAKE_PROPERTY(tex_view_offset, get_tex_view_offset, set_tex_view_offset);
208 MAKE_PROPERTY(
default, get_default);
213 INLINE
void mark_used_by_auto_shader()
const;
216 INLINE
void update_color_flags();
218 static int get_expected_num_combine_operands(CombineMode cm);
219 static bool operand_valid_for_rgb(CombineOperand co);
220 static bool operand_valid_for_alpha(CombineOperand co);
231 int _tex_view_offset;
232 bool _involves_color_scale;
234 bool _uses_primary_color;
235 bool _uses_last_saved_result;
237 CombineMode _combine_rgb_mode;
238 int _num_combine_rgb_operands;
239 CombineSource _combine_rgb_source0;
240 CombineOperand _combine_rgb_operand0;
241 CombineSource _combine_rgb_source1;
242 CombineOperand _combine_rgb_operand1;
243 CombineSource _combine_rgb_source2;
244 CombineOperand _combine_rgb_operand2;
246 CombineMode _combine_alpha_mode;
247 int _num_combine_alpha_operands;
248 CombineSource _combine_alpha_source0;
249 CombineOperand _combine_alpha_operand0;
250 CombineSource _combine_alpha_source1;
251 CombineOperand _combine_alpha_operand1;
252 CombineSource _combine_alpha_source2;
253 CombineOperand _combine_alpha_operand2;
258 mutable bool _used_by_auto_shader;
262 static void register_with_read_factory();
275 static void init_type() {
276 TypedWritableReferenceCount::init_type();
278 TypedWritableReferenceCount::get_class_type());
281 return get_class_type();
283 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
Defines the properties of a named stage of the multitexture pipeline.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.