Panda3D
Loading...
Searching...
No Matches
textureStage.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file textureStage.I
10 * @author masad
11 * @date 2004-07-15
12 */
13
14/**
15 * Initialize the texture stage from other
16 */
18TextureStage(const TextureStage &copy) {
19 (*this) = copy;
20}
21
22/**
23 * Returns the name of this texture stage
24 */
25INLINE const std::string &TextureStage::
26get_name() const {
27 return _name;
28}
29
30/**
31 * Changes the name of this texture stage
32 */
33INLINE void TextureStage::
34set_name(const std::string &name) {
35 _name = name;
36}
37
38/**
39 * Changes the order in which the texture associated with this stage is
40 * rendered relative to the other texture stages. When geometry is rendered
41 * with multiple textures, the textures are rendered in order from the lowest
42 * sort number to the highest sort number.
43 *
44 * Also see set_priority(), which is used to select the most important
45 * textures for rendering when some must be omitted because of hardware
46 * limitations.
47 */
48INLINE void TextureStage::
49set_sort(int sort) {
50 _sort = sort;
51
52 // Update the global flag to indicate that all TextureAttribs in the world
53 // must now re-sort their lists.
54 _sort_seq++;
55
56 if (_used_by_auto_shader) {
57 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
58 }
59}
60
61/**
62 * Returns the sort order of this texture stage.
63 */
64INLINE int TextureStage::
65get_sort() const {
66 return _sort;
67}
68
69/**
70 * Changes the relative importance of the texture associated with this stage
71 * relative to the other texture stages that are applied simultaneously.
72 *
73 * This is unrelated to set_sort(), which controls the order in which multiple
74 * textures are applied. The priority number is used to decide which of the
75 * requested textures are to be selected for rendering when more textures are
76 * requested than the hardware will support. The highest-priority n textures
77 * are selected for rendering, and then rendered in order by their sort
78 * factor.
79 */
80INLINE void TextureStage::
81set_priority(int priority) {
82 _priority = priority;
83
84 // Update the global flag to indicate that all TextureAttribs in the world
85 // must now re-sort their lists.
86 _sort_seq++;
87
88 if (_used_by_auto_shader) {
89 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
90 }
91}
92
93/**
94 * Returns the priority associated with this stage.
95 *
96 * This is specially helpful for cards that do not support more than n stages
97 * of multi-texturing.
98 */
99INLINE int TextureStage::
100get_priority() const {
101 return _priority;
102}
103
104/**
105 * Indicate which set of UV's this texture stage will use. Geometry may have
106 * any number of associated UV sets, each of which must have a unique name.
107 */
108INLINE void TextureStage::
110 if (name != _texcoord_name) {
111 _texcoord_name = name;
112
113 if (_used_by_auto_shader) {
114 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
115 }
116 }
117}
118
119/**
120 * Indicate which set of UV's this texture stage will use. Geometry may have
121 * any number of associated UV sets, each of which must have a unique name.
122 */
123INLINE void TextureStage::
124set_texcoord_name(const std::string &name) {
125 set_texcoord_name(InternalName::get_texcoord_name(name));
126}
127
128/**
129 * See set_texcoord_name. The default is InternalName::get_texcoord().
130 */
132get_texcoord_name() const {
133 return _texcoord_name;
134}
135
136/**
137 * Returns the set of tangents this texture stage will use. This is the same
138 * as get_texcoord_name(), except that the first part is "tangent".
139 */
141get_tangent_name() const {
142 if (_texcoord_name->get_parent() == nullptr) {
143 return InternalName::get_tangent();
144 } else {
145 return InternalName::get_tangent_name(_texcoord_name->get_basename());
146 }
147}
148
149/**
150 * Returns the set of binormals this texture stage will use. This is the same
151 * as get_binormal_name(), except that the first part is "binormal".
152 */
154get_binormal_name() const {
155 if (_texcoord_name->get_parent() == nullptr) {
156 return InternalName::get_binormal();
157 } else {
158 return InternalName::get_binormal_name(_texcoord_name->get_basename());
159 }
160}
161
162/**
163 * Set the mode of this texture stage
164 */
165INLINE void TextureStage::
166set_mode(TextureStage::Mode mode) {
167 if (mode != _mode) {
168 _mode = mode;
169
170 if (_mode != M_combine) {
171 _num_combine_rgb_operands = 0;
172 _num_combine_alpha_operands = 0;
173 }
174
175 update_color_flags();
176 }
177}
178
179/**
180 * Return the mode of this stage
181 */
182INLINE TextureStage::Mode TextureStage::
183get_mode() const {
184 return _mode;
185}
186
187/**
188 * Returns true if the TextureStage is relevant to the classic fixed function
189 * pipeline. This excludes texture stages such as normal mapping and the
190 * like.
191 */
192INLINE bool TextureStage::
193is_fixed_function() const {
194 return (_mode < M_normal);
195}
196
197/**
198 * Set the color for this stage
199 */
200INLINE void TextureStage::
201set_color(const LColor &color) {
202 _color = color;
203}
204
205/**
206 * return the color for this stage
207 */
208INLINE LColor TextureStage::
209get_color() const {
210 return _color;
211}
212
213/**
214 * Sets an additional factor that will scale all three r, g, b components
215 * after the texture has been applied. This is used only when the mode is
216 * CM_combine.
217 *
218 * The only legal values are 1, 2, or 4.
219 */
220INLINE void TextureStage::
221set_rgb_scale(int rgb_scale) {
222 if (rgb_scale != _rgb_scale) {
223 nassertv(rgb_scale == 1 || rgb_scale == 2 || rgb_scale == 4);
224 _rgb_scale = rgb_scale;
225
226 if (_used_by_auto_shader) {
227 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
228 }
229 }
230}
231
232/**
233 * See set_rgb_scale().
234 */
235INLINE int TextureStage::
236get_rgb_scale() const {
237 return _rgb_scale;
238}
239
240/**
241 * Sets an additional factor that will scale the alpha component after the
242 * texture has been applied. This is used only when the mode is CM_combine.
243 *
244 * The only legal values are 1, 2, or 4.
245 */
246INLINE void TextureStage::
247set_alpha_scale(int alpha_scale) {
248 if (alpha_scale != _alpha_scale) {
249 nassertv(alpha_scale == 1 || alpha_scale == 2 || alpha_scale == 4);
250 _alpha_scale = alpha_scale;
251
252 if (_used_by_auto_shader) {
253 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
254 }
255 }
256}
257
258/**
259 * See set_alpha_scale().
260 */
261INLINE int TextureStage::
262get_alpha_scale() const {
263 return _alpha_scale;
264}
265
266/**
267 * Sets the saved_result flag. When this is true, the output of this stage
268 * will be supplied as the "last_saved_result" source for any future stages,
269 * until the next TextureStage with a saved_result set true is encountered.
270 *
271 * This can be used to reuse the results of this texture stage as input to
272 * more than one stage later in the pipeline.
273 *
274 * The last texture in the pipeline (the one with the highest sort value)
275 * should not have this flag set.
276 */
277INLINE void TextureStage::
278set_saved_result(bool saved_result) {
279 if (saved_result != _saved_result) {
280 _saved_result = saved_result;
281
282 if (_used_by_auto_shader) {
283 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
284 }
285 }
286}
287
288/**
289 * Returns the current setting of the saved_result flag. See
290 * set_saved_result().
291 */
292INLINE bool TextureStage::
293get_saved_result() const {
294 return _saved_result;
295}
296
297/**
298 * Sets the tex_view_offset value. This is used only when a special multiview
299 * texture is bound to the TextureStage, and it selects the particular view of
300 * the texture that is to be used.
301 *
302 * This value is added to the similar parameter on DisplayRegion to derive the
303 * final texture view index that is selected for rendering.
304 */
305INLINE void TextureStage::
306set_tex_view_offset(int tex_view_offset) {
307 _tex_view_offset = tex_view_offset;
308}
309
310/**
311 * Returns the current setting of the tex_view_offset. See
312 * set_tex_view_offset().
313 */
314INLINE int TextureStage::
315get_tex_view_offset() const {
316 return _tex_view_offset;
317}
318
319/**
320 * Specifies any of the CombineMode values that represent a one-parameter
321 * operation. Specifically, this is CM_replace only.
322 */
323INLINE void TextureStage::
324set_combine_rgb(CombineMode mode,
325 CombineSource source0, CombineOperand operand0) {
326 nassertv(get_expected_num_combine_operands(mode) == 1);
327 nassertv(operand_valid_for_rgb(operand0));
328 _mode = M_combine;
329 _num_combine_rgb_operands = 1;
330 _combine_rgb_mode = mode;
331 _combine_rgb_source0 = source0;
332 _combine_rgb_operand0 = operand0;
333 _combine_rgb_source1 = CS_undefined;
334 _combine_rgb_operand1 = CO_undefined;
335 _combine_rgb_source2 = CS_undefined;
336 _combine_rgb_operand2 = CO_undefined;
337
338 update_color_flags();
339}
340
341/**
342 * Specifies any of the CombineMode values that represent a two-parameter
343 * operation. Specifically, this is everything except for CM_replace and
344 * CM_interpolate.
345 */
346INLINE void TextureStage::
347set_combine_rgb(CombineMode mode,
348 CombineSource source0, CombineOperand operand0,
349 CombineSource source1, CombineOperand operand1) {
350 nassertv(get_expected_num_combine_operands(mode) == 2);
351 nassertv(operand_valid_for_rgb(operand0));
352 nassertv(operand_valid_for_rgb(operand1));
353 _mode = M_combine;
354 _num_combine_rgb_operands = 2;
355 _combine_rgb_mode = mode;
356 _combine_rgb_source0 = source0;
357 _combine_rgb_operand0 = operand0;
358 _combine_rgb_source1 = source1;
359 _combine_rgb_operand1 = operand1;
360 _combine_rgb_source2 = CS_undefined;
361 _combine_rgb_operand2 = CO_undefined;
362
363 update_color_flags();
364}
365
366/**
367 * Specifies any of the CombineMode values that represent a one-parameter
368 * operation. Specifically, this is CM_interpolate only.
369 */
370INLINE void TextureStage::
371set_combine_rgb(CombineMode mode,
372 CombineSource source0, CombineOperand operand0,
373 CombineSource source1, CombineOperand operand1,
374 CombineSource source2, CombineOperand operand2) {
375 nassertv(get_expected_num_combine_operands(mode) == 3);
376 nassertv(operand_valid_for_rgb(operand0));
377 nassertv(operand_valid_for_rgb(operand1));
378 nassertv(operand_valid_for_rgb(operand2));
379 _mode = M_combine;
380 _num_combine_rgb_operands = 3;
381 _combine_rgb_mode = mode;
382 _combine_rgb_source0 = source0;
383 _combine_rgb_operand0 = operand0;
384 _combine_rgb_source1 = source1;
385 _combine_rgb_operand1 = operand1;
386 _combine_rgb_source2 = source2;
387 _combine_rgb_operand2 = operand2;
388
389 update_color_flags();
390}
391
392/**
393 * Get the combine_rgb_mode
394 */
395INLINE TextureStage::CombineMode TextureStage::
396get_combine_rgb_mode() const {
397 return _combine_rgb_mode;
398}
399
400/**
401 * Returns the number of meaningful operands that may be retrieved via
402 * get_combine_rgb_sourceN() and get_combine_rgb_operandN().
403 */
406 return _num_combine_rgb_operands;
407}
408
409/**
410 * Get source0 of combine_rgb_mode
411 */
412INLINE TextureStage::CombineSource TextureStage::
414 return _combine_rgb_source0;
415}
416
417/**
418 * Get operand0 of combine_rgb_mode
419 */
420INLINE TextureStage::CombineOperand TextureStage::
422 return _combine_rgb_operand0;
423}
424
425/**
426 * Get source1 of combine_rgb_mode
427 */
428INLINE TextureStage::CombineSource TextureStage::
430 return _combine_rgb_source1;
431}
432
433/**
434 * Get operand1 of combine_rgb_mode
435 */
436INLINE TextureStage::CombineOperand TextureStage::
438 return _combine_rgb_operand1;
439}
440
441/**
442 * Get source2 of combine_rgb_mode
443 */
444INLINE TextureStage::CombineSource TextureStage::
446 return _combine_rgb_source2;
447}
448
449/**
450 * Get operand2 of combine_rgb_mode
451 */
452INLINE TextureStage::CombineOperand TextureStage::
454 return _combine_rgb_operand2;
455}
456
457/**
458 * Specifies any of the CombineMode values that represent a one-parameter
459 * operation. Specifically, this is CM_replace only.
460 */
461INLINE void TextureStage::
462set_combine_alpha(CombineMode mode,
463 CombineSource source0, CombineOperand operand0) {
464 nassertv(get_expected_num_combine_operands(mode) == 1);
465 nassertv(operand_valid_for_alpha(operand0));
466 _mode = M_combine;
467 _num_combine_alpha_operands = 1;
468 _combine_alpha_mode = mode;
469 _combine_alpha_source0 = source0;
470 _combine_alpha_operand0 = operand0;
471 _combine_alpha_source1 = CS_undefined;
472 _combine_alpha_operand1 = CO_undefined;
473 _combine_alpha_source2 = CS_undefined;
474 _combine_alpha_operand2 = CO_undefined;
475
476 update_color_flags();
477}
478
479/**
480 * Specifies any of the CombineMode values that represent a two-parameter
481 * operation. Specifically, this is everything except for CM_replace and
482 * CM_interpolate.
483 */
484INLINE void TextureStage::
485set_combine_alpha(CombineMode mode,
486 CombineSource source0, CombineOperand operand0,
487 CombineSource source1, CombineOperand operand1) {
488 nassertv(get_expected_num_combine_operands(mode) == 2);
489 nassertv(operand_valid_for_alpha(operand0));
490 nassertv(operand_valid_for_alpha(operand1));
491 _mode = M_combine;
492 _num_combine_alpha_operands = 2;
493 _combine_alpha_mode = mode;
494 _combine_alpha_source0 = source0;
495 _combine_alpha_operand0 = operand0;
496 _combine_alpha_source1 = source1;
497 _combine_alpha_operand1 = operand1;
498 _combine_alpha_source2 = CS_undefined;
499 _combine_alpha_operand2 = CO_undefined;
500
501 update_color_flags();
502}
503
504/**
505 * Specifies any of the CombineMode values that represent a one-parameter
506 * operation. Specifically, this is CM_interpolate only.
507 */
508INLINE void TextureStage::
509set_combine_alpha(CombineMode mode,
510 CombineSource source0, CombineOperand operand0,
511 CombineSource source1, CombineOperand operand1,
512 CombineSource source2, CombineOperand operand2) {
513 nassertv(get_expected_num_combine_operands(mode) == 3);
514 nassertv(operand_valid_for_alpha(operand0));
515 nassertv(operand_valid_for_alpha(operand1));
516 nassertv(operand_valid_for_alpha(operand2));
517 _mode = M_combine;
518 _num_combine_alpha_operands = 3;
519 _combine_alpha_mode = mode;
520 _combine_alpha_source0 = source0;
521 _combine_alpha_operand0 = operand0;
522 _combine_alpha_source1 = source1;
523 _combine_alpha_operand1 = operand1;
524 _combine_alpha_source2 = source2;
525 _combine_alpha_operand2 = operand2;
526
527 update_color_flags();
528}
529
530/**
531 * Get combine_alpha_mode
532 */
533INLINE TextureStage::CombineMode TextureStage::
535 return _combine_alpha_mode;
536}
537
538/**
539 * Returns the number of meaningful operands that may be retrieved via
540 * get_combine_alpha_sourceN() and get_combine_alpha_operandN().
541 */
544 return _num_combine_alpha_operands;
545}
546
547/**
548 * Get source0 of combine_alpha_mode
549 */
550INLINE TextureStage::CombineSource TextureStage::
552 return _combine_alpha_source0;
553}
554
555/**
556 * Get operand0 of combine_alpha_mode
557 */
558INLINE TextureStage::CombineOperand TextureStage::
560 return _combine_alpha_operand0;
561}
562
563/**
564 * Get source1 of combine_alpha_mode
565 */
566INLINE TextureStage::CombineSource TextureStage::
568 return _combine_alpha_source1;
569}
570
571/**
572 * Get operand1 of combine_alpha_mode
573 */
574INLINE TextureStage::CombineOperand TextureStage::
576 return _combine_alpha_operand1;
577}
578
579/**
580 * Get source2 of combine_alpha_mode
581 */
582INLINE TextureStage::CombineSource TextureStage::
584 return _combine_alpha_source2;
585}
586
587/**
588 * Get operand2 of combine_alpha_mode
589 */
590INLINE TextureStage::CombineOperand TextureStage::
592 return _combine_alpha_operand2;
593}
594
595/**
596 * Returns true if the TextureStage is affected by the setting of the current
597 * ColorScaleAttrib, false otherwise.
598 */
599INLINE bool TextureStage::
600involves_color_scale() const {
601 return _involves_color_scale;
602}
603
604/**
605 * Returns true if the TextureStage makes use of whatever color is specified
606 * in set_color(), false otherwise.
607 */
608INLINE bool TextureStage::
609uses_color() const {
610 return _uses_color;
611}
612
613/**
614 * Returns true if the TextureStage makes use of the CS_primary_color combine
615 * source.
616 */
617INLINE bool TextureStage::
618uses_primary_color() const {
619 return _uses_primary_color;
620}
621
622/**
623 * Returns true if the TextureStage makes use of the CS_primary_color combine
624 * source.
625 */
626INLINE bool TextureStage::
628 return _uses_last_saved_result;
629}
630
631/**
632 *
633 */
634INLINE bool TextureStage::
635operator == (const TextureStage &other) const {
636 return compare_to(other) == 0;
637}
638
639/**
640 *
641 */
642INLINE bool TextureStage::
643operator != (const TextureStage &other) const {
644 return compare_to(other) != 0;
645}
646
647/**
648 *
649 */
650INLINE bool TextureStage::
651operator < (const TextureStage &other) const {
652 return compare_to(other) < 0;
653}
654
655/**
656 * Returns the default TextureStage that will be used for all texturing that
657 * does not name a particular stage. This generally handles the normal
658 * single-texture case.
659 */
661get_default() {
662 if (_default_stage == nullptr) {
663 _default_stage = new TextureStage("default");
664 }
665 return _default_stage;
666}
667
668/**
669 * Returns a global sequence number that is incremented any time any
670 * TextureStage in the world changes sort or priority. This is used by
671 * TextureAttrib to determine when it is necessary to re-sort its internal
672 * array of stages.
673 */
675get_sort_seq() {
676 return _sort_seq;
677}
678
679/**
680 * Marks this TextureStage as having been used by the auto shader.
681 */
682INLINE void TextureStage::
684 _used_by_auto_shader = true;
685}
686
687/**
688 * Updates _uses_color, _involves_color_scale, _uses_primary_color and
689 * _uses_last_saved_result appropriately.
690 */
691INLINE void TextureStage::
692update_color_flags() {
693 _involves_color_scale =
694 (_mode == M_blend_color_scale ||
695 (_mode == M_combine &&
696 (_combine_rgb_source0 == CS_constant_color_scale ||
697 _combine_rgb_source1 == CS_constant_color_scale ||
698 _combine_rgb_source2 == CS_constant_color_scale ||
699 _combine_alpha_source0 == CS_constant_color_scale ||
700 _combine_alpha_source1 == CS_constant_color_scale ||
701 _combine_alpha_source2 == CS_constant_color_scale)));
702
703 _uses_color =
704 (_mode == M_blend || _mode == M_blend_color_scale ||
705 (_mode == M_combine &&
706 (_combine_rgb_source0 == CS_constant ||
707 _combine_rgb_source1 == CS_constant ||
708 _combine_rgb_source2 == CS_constant ||
709 _combine_alpha_source0 == CS_constant ||
710 _combine_alpha_source1 == CS_constant ||
711 _combine_alpha_source2 == CS_constant)));
712
713 _uses_primary_color =
714 (_mode == M_combine &&
715 (_combine_rgb_source0 == CS_primary_color ||
716 _combine_rgb_source1 == CS_primary_color ||
717 _combine_rgb_source2 == CS_primary_color ||
718 _combine_alpha_source0 == CS_primary_color ||
719 _combine_alpha_source1 == CS_primary_color ||
720 _combine_alpha_source2 == CS_primary_color));
721
722 _uses_last_saved_result =
723 (_mode == M_combine &&
724 (_combine_rgb_source0 == CS_last_saved_result ||
725 _combine_rgb_source1 == CS_last_saved_result ||
726 _combine_rgb_source2 == CS_last_saved_result ||
727 _combine_alpha_source0 == CS_last_saved_result ||
728 _combine_alpha_source1 == CS_last_saved_result ||
729 _combine_alpha_source2 == CS_last_saved_result));
730
731 if (_used_by_auto_shader) {
732 GraphicsStateGuardianBase::mark_rehash_generated_shaders();
733 }
734}
735
736INLINE std::ostream &
737operator << (std::ostream &out, const TextureStage &ts) {
738 ts.output(out);
739 return out;
740}
Encodes a string name in a hash table, mapping it to a pointer.
Defines the properties of a named stage of the multitexture pipeline.
bool uses_primary_color() const
Returns true if the TextureStage makes use of the CS_primary_color combine source.
get_default
Returns the default TextureStage that will be used for all texturing that does not name a particular ...
int compare_to(const TextureStage &other) const
Returns a number less than zero if this TextureStage sorts before the other one, greater than zero if...
get_binormal_name
Returns the set of binormals this texture stage will use.
CombineMode get_combine_alpha_mode() const
Get combine_alpha_mode.
set_sort
Changes the order in which the texture associated with this stage is rendered relative to the other t...
get_saved_result
Returns the current setting of the saved_result flag.
get_name
Returns the name of this texture stage.
CombineOperand get_combine_rgb_operand2() const
Get operand2 of combine_rgb_mode.
set_tex_view_offset
Sets the tex_view_offset value.
CombineSource get_combine_alpha_source1() const
Get source1 of combine_alpha_mode.
void output(std::ostream &out) const
Just a single line output.
TextureStage(const std::string &name)
Initialize the texture stage at construction.
CombineMode get_combine_rgb_mode() const
Get the combine_rgb_mode.
CombineSource get_combine_rgb_source1() const
Get source1 of combine_rgb_mode.
bool is_fixed_function() const
Returns true if the TextureStage is relevant to the classic fixed function pipeline.
bool involves_color_scale() const
Returns true if the TextureStage is affected by the setting of the current ColorScaleAttrib,...
CombineOperand get_combine_alpha_operand0() const
Get operand0 of combine_alpha_mode.
set_color
Set the color for this stage.
get_priority
Returns the priority associated with this stage.
CombineOperand get_combine_rgb_operand1() const
Get operand1 of combine_rgb_mode.
CombineSource get_combine_alpha_source0() const
Get source0 of combine_alpha_mode.
get_rgb_scale
See set_rgb_scale().
set_name
Changes the name of this texture stage.
get_alpha_scale
See set_alpha_scale().
set_mode
Set the mode of this texture stage.
get_sort
Returns the sort order of this texture stage.
int get_num_combine_rgb_operands() const
Returns the number of meaningful operands that may be retrieved via get_combine_rgb_sourceN() and get...
CombineOperand get_combine_alpha_operand1() const
Get operand1 of combine_alpha_mode.
get_color
return the color for this stage
get_tex_view_offset
Returns the current setting of the tex_view_offset.
void mark_used_by_auto_shader() const
Marks this TextureStage as having been used by the auto shader.
CombineSource get_combine_rgb_source0() const
Get source0 of combine_rgb_mode.
CombineSource get_combine_rgb_source2() const
Get source2 of combine_rgb_mode.
get_mode
Return the mode of this stage.
void set_combine_rgb(CombineMode mode, CombineSource source0, CombineOperand operand0)
Specifies any of the CombineMode values that represent a one-parameter operation.
static UpdateSeq get_sort_seq()
Returns a global sequence number that is incremented any time any TextureStage in the world changes s...
set_priority
Changes the relative importance of the texture associated with this stage relative to the other textu...
bool uses_color() const
Returns true if the TextureStage makes use of whatever color is specified in set_color(),...
int get_num_combine_alpha_operands() const
Returns the number of meaningful operands that may be retrieved via get_combine_alpha_sourceN() and g...
CombineOperand get_combine_rgb_operand0() const
Get operand0 of combine_rgb_mode.
CombineSource get_combine_alpha_source2() const
Get source2 of combine_alpha_mode.
void set_combine_alpha(CombineMode mode, CombineSource source0, CombineOperand operand0)
Specifies any of the CombineMode values that represent a one-parameter operation.
get_texcoord_name
See set_texcoord_name.
set_alpha_scale
Sets an additional factor that will scale the alpha component after the texture has been applied.
bool uses_last_saved_result() const
Returns true if the TextureStage makes use of the CS_primary_color combine source.
set_rgb_scale
Sets an additional factor that will scale all three r, g, b components after the texture has been app...
get_tangent_name
Returns the set of tangents this texture stage will use.
set_saved_result
Sets the saved_result flag.
set_texcoord_name
Indicate which set of UV's this texture stage will use.
CombineOperand get_combine_alpha_operand2() const
Get operand2 of combine_alpha_mode.
This is a sequence number that increments monotonically.
Definition updateSeq.h:37