mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 15:25:54 -04:00
gobj: Add TextureStage::write()
overload with indent_level
param
This commit is contained in:
parent
356e974029
commit
a11f7c9c8d
@ -15,6 +15,7 @@
|
||||
#include "internalName.h"
|
||||
#include "bamReader.h"
|
||||
#include "bamWriter.h"
|
||||
#include "indent.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
@ -221,15 +222,28 @@ compare_to(const TextureStage &other) const {
|
||||
*/
|
||||
void TextureStage::
|
||||
write(ostream &out) const {
|
||||
out << "TextureStage " << get_name() << ", sort = " << get_sort() << ", priority = " << get_priority() << "\n"
|
||||
<< " texcoords = " << get_texcoord_name()->get_name()
|
||||
<< ", mode = " << get_mode() << ", color = " << get_color()
|
||||
<< ", scale = " << get_rgb_scale() << ", " << get_alpha_scale()
|
||||
<< ", saved_result = " << get_saved_result()
|
||||
<< ", tex_view_offset = " << get_tex_view_offset() << "\n";
|
||||
write(out, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the details of this stage
|
||||
*/
|
||||
void TextureStage::
|
||||
write(ostream &out, int indent_level) const {
|
||||
indent(out, indent_level)
|
||||
<< "TextureStage " << get_name() << ", sort = " << get_sort()
|
||||
<< ", priority = " << get_priority() << "\n";
|
||||
|
||||
indent(out, indent_level)
|
||||
<< " texcoords = " << get_texcoord_name()->get_name()
|
||||
<< ", mode = " << get_mode() << ", color = " << get_color()
|
||||
<< ", scale = " << get_rgb_scale() << ", " << get_alpha_scale()
|
||||
<< ", saved_result = " << get_saved_result()
|
||||
<< ", tex_view_offset = " << get_tex_view_offset() << "\n";
|
||||
|
||||
if (get_mode() == M_combine) {
|
||||
out << " RGB combine mode = " << get_combine_rgb_mode() << "\n";
|
||||
indent(out, indent_level)
|
||||
<< " RGB combine mode = " << get_combine_rgb_mode() << "\n";
|
||||
if (get_num_combine_rgb_operands() >= 1) {
|
||||
out << " 0: " << get_combine_rgb_source0() << ", "
|
||||
<< get_combine_rgb_operand0() << "\n";
|
||||
@ -242,7 +256,8 @@ write(ostream &out) const {
|
||||
out << " 2: " << get_combine_rgb_source2() << ", "
|
||||
<< get_combine_rgb_operand2() << "\n";
|
||||
}
|
||||
out << " alpha combine mode = " << get_combine_alpha_mode() << "\n";
|
||||
indent(out, indent_level)
|
||||
<< " alpha combine mode = " << get_combine_alpha_mode() << "\n";
|
||||
if (get_num_combine_alpha_operands() >= 1) {
|
||||
out << " 0: " << get_combine_alpha_source0() << ", "
|
||||
<< get_combine_alpha_operand0() << "\n";
|
||||
|
@ -182,6 +182,7 @@ PUBLISHED:
|
||||
int compare_to(const TextureStage &other) const;
|
||||
|
||||
void write(std::ostream &out) const;
|
||||
void write(std::ostream &out, int indent_level) const;
|
||||
void output(std::ostream &out) const;
|
||||
|
||||
INLINE static TextureStage *get_default();
|
||||
|
Loading…
x
Reference in New Issue
Block a user