Panda3D
|
Defines the properties of a named stage of the multitexture pipeline. More...
#include "textureStage.h"
Public Member Functions | |
TextureStage (const string &name) | |
Initialize the texture stage at construction. More... | |
TextureStage (TextureStage ©) | |
Initialize the texture stage from other. More... | |
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 it sorts after, or zero if they are equivalent. More... | |
virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). More... | |
virtual TypeHandle | force_init_type () |
int | get_alpha_scale () const |
See set_alpha_scale(). More... | |
InternalName * | get_binormal_name () const |
Returns the set of binormals this texture stage will use. More... | |
LColor | get_color () const |
return the color for this stage More... | |
CombineMode | get_combine_alpha_mode () const |
Get combine_alpha_mode. More... | |
CombineOperand | get_combine_alpha_operand0 () const |
Get operand0 of combine_alpha_mode. More... | |
CombineOperand | get_combine_alpha_operand1 () const |
Get operand1 of combine_alpha_mode. More... | |
CombineOperand | get_combine_alpha_operand2 () const |
Get operand2 of combine_alpha_mode. More... | |
CombineSource | get_combine_alpha_source0 () const |
Get source0 of combine_alpha_mode. More... | |
CombineSource | get_combine_alpha_source1 () const |
Get source1 of combine_alpha_mode. More... | |
CombineSource | get_combine_alpha_source2 () const |
Get source2 of combine_alpha_mode. More... | |
CombineMode | get_combine_rgb_mode () const |
Get the combine_rgb_mode. More... | |
CombineOperand | get_combine_rgb_operand0 () const |
Get operand0 of combine_rgb_mode. More... | |
CombineOperand | get_combine_rgb_operand1 () const |
Get operand1 of combine_rgb_mode. More... | |
CombineOperand | get_combine_rgb_operand2 () const |
Get operand2 of combine_rgb_mode. More... | |
CombineSource | get_combine_rgb_source0 () const |
Get source0 of combine_rgb_mode. More... | |
CombineSource | get_combine_rgb_source1 () const |
Get source1 of combine_rgb_mode. More... | |
CombineSource | get_combine_rgb_source2 () const |
Get source2 of combine_rgb_mode. More... | |
Mode | get_mode () const |
Return the mode of this stage. More... | |
const string & | get_name () const |
Returns the name of this texture stage. More... | |
int | get_num_combine_alpha_operands () const |
Returns the number of meaningful operands that may be retrieved via get_combine_alpha_sourceN() and get_combine_alpha_operandN(). More... | |
int | get_num_combine_rgb_operands () const |
Returns the number of meaningful operands that may be retrieved via get_combine_rgb_sourceN() and get_combine_rgb_operandN(). More... | |
int | get_priority () const |
Returns the priority associated with this stage. More... | |
int | get_rgb_scale () const |
See set_rgb_scale(). More... | |
bool | get_saved_result () const |
Returns the current setting of the saved_result flag. More... | |
int | get_sort () const |
Returns the sort order of this texture stage. More... | |
InternalName * | get_tangent_name () const |
Returns the set of tangents this texture stage will use. More... | |
int | get_tex_view_offset () const |
Returns the current setting of the tex_view_offset. More... | |
InternalName * | get_texcoord_name () const |
See set_texcoord_name. More... | |
virtual TypeHandle | get_type () const |
bool | involves_color_scale () const |
Returns true if the TextureStage is affected by the setting of the current ColorScaleAttrib, false otherwise. More... | |
bool | is_fixed_function () const |
Returns true if the TextureStage is relevant to the classic fixed function pipeline. More... | |
bool | operator!= (const TextureStage &other) const |
bool | operator< (const TextureStage &other) const |
void | operator= (const TextureStage ©) |
just copy the members of other to this More... | |
bool | operator== (const TextureStage &other) const |
void | output (ostream &out) const |
Just a single line output. More... | |
void | set_alpha_scale (int alpha_scale) |
Sets an additional factor that will scale the alpha component after the texture has been applied. More... | |
void | set_color (const LColor &color) |
Set the color for this stage. More... | |
void | set_combine_alpha (CombineMode mode, CombineSource source0, CombineOperand operand0) |
Specifies any of the CombineMode values that represent a one-parameter operation. More... | |
void | set_combine_alpha (CombineMode mode, CombineSource source0, CombineOperand operand0, CombineSource source1, CombineOperand operand1) |
Specifies any of the CombineMode values that represent a two-parameter operation. More... | |
void | set_combine_alpha (CombineMode mode, CombineSource source0, CombineOperand operand0, CombineSource source1, CombineOperand operand1, CombineSource source2, CombineOperand operand2) |
Specifies any of the CombineMode values that represent a one-parameter operation. More... | |
void | set_combine_rgb (CombineMode mode, CombineSource source0, CombineOperand operand0) |
Specifies any of the CombineMode values that represent a one-parameter operation. More... | |
void | set_combine_rgb (CombineMode mode, CombineSource source0, CombineOperand operand0, CombineSource source1, CombineOperand operand1) |
Specifies any of the CombineMode values that represent a two-parameter operation. More... | |
void | set_combine_rgb (CombineMode mode, CombineSource source0, CombineOperand operand0, CombineSource source1, CombineOperand operand1, CombineSource source2, CombineOperand operand2) |
Specifies any of the CombineMode values that represent a one-parameter operation. More... | |
void | set_mode (Mode mode) |
Set the mode of this texture stage. More... | |
void | set_name (const string &name) |
Changes the name of this texture stage. More... | |
void | set_priority (int priority) |
Changes the relative importance of the texture associated with this stage relative to the other texture stages that are applied simultaneously. More... | |
void | set_rgb_scale (int rgb_scale) |
Sets an additional factor that will scale all three r, g, b components after the texture has been applied. More... | |
void | set_saved_result (bool saved_result) |
Sets the saved_result flag. More... | |
void | set_sort (int sort) |
Changes the order in which the texture associated with this stage is rendered relative to the other texture stages. More... | |
void | set_tex_view_offset (int tex_view_offset) |
Sets the tex_view_offset value. More... | |
void | set_texcoord_name (InternalName *name) |
Indicate which set of UV's this texture stage will use. More... | |
void | set_texcoord_name (const string &texcoord_name) |
Indicate which set of UV's this texture stage will use. More... | |
bool | uses_color () const |
Returns true if the TextureStage makes use of whatever color is specified in set_color(), false otherwise. More... | |
bool | uses_last_saved_result () const |
Returns true if the TextureStage makes use of the CS_primary_color combine source. More... | |
bool | uses_primary_color () const |
Returns true if the TextureStage makes use of the CS_primary_color combine source. More... | |
void | write (ostream &out) const |
Writes the details of this stage. More... | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. More... | |
![]() | |
TypedWritableReferenceCount (const TypedWritableReferenceCount ©) | |
virtual ReferenceCount * | as_reference_count () |
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type. More... | |
void | operator= (const TypedWritableReferenceCount ©) |
![]() | |
TypedWritable (const TypedWritable ©) | |
string | encode_to_bam_stream () const |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string. More... | |
bool | encode_to_bam_stream (string &data, BamWriter *writer=NULL) const |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. More... | |
virtual void | finalize (BamReader *manager) |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed. More... | |
UpdateSeq | get_bam_modified () const |
Returns the current bam_modified counter. More... | |
void | mark_bam_modified () |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. More... | |
void | operator= (const TypedWritable ©) |
virtual bool | require_fully_complete () const |
Some objects require all of their nested pointers to have been completed before the objects themselves can be completed. More... | |
virtual void | update_bam_nested (BamWriter *manager) |
Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates. More... | |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static TextureStage * | get_default () |
Returns the default TextureStage that will be used for all texturing that does not name a particular stage. More... | |
static UpdateSeq | get_sort_seq () |
Returns a global sequence number that is incremented any time any TextureStage in the world changes sort or priority. More... | |
static void | init_type () |
static TypedWritable * | make_TextureStage (const FactoryParams ¶ms) |
Factory method to generate a TextureStage object. More... | |
static void | register_with_read_factory () |
Factory method to generate a TextureStage object. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
static | PT (TypedWritableReferenceCount) decode_from_bam_stream(const string &data |
![]() | |
static bool | decode_raw_from_bam_stream (TypedWritable *&ptr, ReferenceCount *&ref_ptr, const string &data, BamReader *reader=NULL) |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string. More... | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Additional Inherited Members | |
![]() | |
static BamReader * | reader = NULL) |
![]() | |
static TypedWritable *const | Null = (TypedWritable*)0L |
Defines the properties of a named stage of the multitexture pipeline.
The TextureAttrib will associated a number of these stages with Texture objects, and the GSG will render geometry by sorting all of the currently active TextureStages in order and then issuing the appropriate rendering calls to activate them.
Definition at line 38 of file textureStage.h.
TextureStage::TextureStage | ( | const string & | name | ) |
Initialize the texture stage at construction.
Definition at line 31 of file textureStage.cxx.
References operator=().
Referenced by get_default(), and make_TextureStage().
|
inline |
Initialize the texture stage from other.
Definition at line 22 of file textureStage.I.
References get_name().
int TextureStage::compare_to | ( | const TextureStage & | other | ) | const |
Returns a number less than zero if this TextureStage sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.
The sorting order is arbitrary and largely meaningless, except to differentiate different stages.
Definition at line 119 of file textureStage.cxx.
References get_alpha_scale(), get_combine_alpha_mode(), get_combine_alpha_operand0(), get_combine_alpha_operand1(), get_combine_alpha_operand2(), get_combine_alpha_source0(), get_combine_alpha_source1(), get_combine_alpha_source2(), get_combine_rgb_mode(), get_combine_rgb_operand0(), get_combine_rgb_operand1(), get_combine_rgb_operand2(), get_combine_rgb_source0(), get_combine_rgb_source1(), get_combine_rgb_source2(), get_mode(), get_name(), get_num_combine_alpha_operands(), get_num_combine_rgb_operands(), get_priority(), get_rgb_scale(), get_saved_result(), get_sort(), get_tex_view_offset(), get_texcoord_name(), and write().
Referenced by operator=(), and uses_last_saved_result().
|
virtual |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Reimplemented from TypedWritable.
Definition at line 441 of file textureStage.cxx.
References TypedWritable::complete_pointers(), and write_datagram().
Referenced by make_TextureStage().
|
inline |
See set_alpha_scale().
Definition at line 289 of file textureStage.I.
References set_saved_result().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_alpha_scale(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Returns the set of binormals this texture stage will use.
This is the same as get_binormal_name(), except that the first part is "binormal".
Definition at line 176 of file textureStage.I.
References set_mode().
Referenced by get_tangent_name().
|
inline |
return the color for this stage
Definition at line 238 of file textureStage.I.
References set_rgb_scale().
Referenced by DXGraphicsStateGuardian9::get_index_type(), set_color(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get combine_alpha_mode.
Definition at line 605 of file textureStage.I.
References get_num_combine_alpha_operands().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_combine_alpha(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get operand0 of combine_alpha_mode.
Definition at line 637 of file textureStage.I.
References get_combine_alpha_source1().
Referenced by compare_to(), get_combine_alpha_source0(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get operand1 of combine_alpha_mode.
Definition at line 657 of file textureStage.I.
References get_combine_alpha_source2().
Referenced by compare_to(), get_combine_alpha_source1(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get operand2 of combine_alpha_mode.
Definition at line 677 of file textureStage.I.
References involves_color_scale().
Referenced by compare_to(), get_combine_alpha_source2(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get source0 of combine_alpha_mode.
Definition at line 627 of file textureStage.I.
References get_combine_alpha_operand0().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), get_num_combine_alpha_operands(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get source1 of combine_alpha_mode.
Definition at line 647 of file textureStage.I.
References get_combine_alpha_operand1().
Referenced by compare_to(), get_combine_alpha_operand0(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get source2 of combine_alpha_mode.
Definition at line 667 of file textureStage.I.
References get_combine_alpha_operand2().
Referenced by compare_to(), get_combine_alpha_operand1(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get the combine_rgb_mode.
Definition at line 441 of file textureStage.I.
References get_num_combine_rgb_operands().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_combine_rgb(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get operand0 of combine_rgb_mode.
Definition at line 473 of file textureStage.I.
References get_combine_rgb_source1().
Referenced by compare_to(), get_combine_rgb_source0(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get operand1 of combine_rgb_mode.
Definition at line 493 of file textureStage.I.
References get_combine_rgb_source2().
Referenced by compare_to(), get_combine_rgb_source1(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get operand2 of combine_rgb_mode.
Definition at line 513 of file textureStage.I.
References set_combine_alpha().
Referenced by compare_to(), get_combine_rgb_source2(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get source0 of combine_rgb_mode.
Definition at line 463 of file textureStage.I.
References get_combine_rgb_operand0().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), get_num_combine_rgb_operands(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get source1 of combine_rgb_mode.
Definition at line 483 of file textureStage.I.
References get_combine_rgb_operand1().
Referenced by compare_to(), get_combine_rgb_operand0(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Get source2 of combine_rgb_mode.
Definition at line 503 of file textureStage.I.
References get_combine_rgb_operand2().
Referenced by compare_to(), get_combine_rgb_operand1(), DXGraphicsStateGuardian9::get_index_type(), write(), and ShaderGenerator::~ShaderGenerator().
|
inlinestatic |
Returns the default TextureStage that will be used for all texturing that does not name a particular stage.
This generally handles the normal single-texture case.
Definition at line 766 of file textureStage.I.
References get_sort_seq(), and TextureStage().
Referenced by SpriteParticleRenderer::add_from_node(), UvScrollNode::cull_callback(), MultitexReducer::flatten(), NodePath::get_texture_sampler(), EggLoader::make_polyset(), make_TextureStage(), CullableObject::munge_geom(), NodePathCollection::set_texture(), NodePath::set_texture(), uses_last_saved_result(), and write_datagram().
|
inline |
Return the mode of this stage.
Definition at line 206 of file textureStage.I.
References is_fixed_function().
Referenced by EggSaver::add_node(), TinyGraphicsStateGuardian::bind_light(), compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_mode(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Returns the name of this texture stage.
Definition at line 32 of file textureStage.I.
References set_name().
Referenced by compare_to(), NodePath::find_all_texture_stages(), TextureAttrib::find_on_stage(), TextureStageCollection::find_texture_stage(), MultitexReducer::flatten(), output(), TextureStage(), TextureStagePool::write(), and write().
|
inline |
Returns the number of meaningful operands that may be retrieved via get_combine_alpha_sourceN() and get_combine_alpha_operandN().
Definition at line 617 of file textureStage.I.
References get_combine_alpha_source0().
Referenced by compare_to(), get_combine_alpha_mode(), DXGraphicsStateGuardian9::get_index_type(), and write().
|
inline |
Returns the number of meaningful operands that may be retrieved via get_combine_rgb_sourceN() and get_combine_rgb_operandN().
Definition at line 453 of file textureStage.I.
References get_combine_rgb_source0().
Referenced by compare_to(), get_combine_rgb_mode(), DXGraphicsStateGuardian9::get_index_type(), and write().
|
inline |
Returns the priority associated with this stage.
This is specially helpful for cards that do not support more than n stages of multi-texturing.
Definition at line 113 of file textureStage.I.
References set_texcoord_name().
Referenced by compare_to(), set_priority(), and write().
|
inline |
See set_rgb_scale().
Definition at line 264 of file textureStage.I.
References set_alpha_scale().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_rgb_scale(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Returns the current setting of the saved_result flag.
See set_saved_result().
Definition at line 321 of file textureStage.I.
References set_tex_view_offset().
Referenced by compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_saved_result(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Returns the sort order of this texture stage.
Definition at line 75 of file textureStage.I.
References set_priority().
Referenced by compare_to(), TextureStageCollection::operator+(), set_sort(), and write().
|
inlinestatic |
Returns a global sequence number that is incremented any time any TextureStage in the world changes sort or priority.
This is used by TextureAttrib to determine when it is necessary to re-sort its internal array of stages.
Definition at line 783 of file textureStage.I.
References output().
Referenced by TextureAttrib::complete_pointers(), TextureAttrib::find_on_stage(), get_default(), and TextureAttrib::is_identity().
|
inline |
Returns the set of tangents this texture stage will use.
This is the same as get_texcoord_name(), except that the first part is "tangent".
Definition at line 160 of file textureStage.I.
References get_binormal_name().
Referenced by get_texcoord_name().
|
inline |
Returns the current setting of the tex_view_offset.
Definition at line 349 of file textureStage.I.
References set_combine_rgb().
Referenced by TinyGraphicsStateGuardian::bind_light(), compare_to(), DXGraphicsStateGuardian9::get_index_type(), set_tex_view_offset(), DXShaderContext9::update_shader_texture_bindings(), and write().
|
inline |
See set_texcoord_name.
The default is InternalName::get_texcoord().
Definition at line 148 of file textureStage.I.
References get_tangent_name().
Referenced by GeomNode::apply_attribs_to_vertices(), GeomTransformer::apply_texture_colors(), TinyGraphicsStateGuardian::begin_draw_primitives(), compare_to(), TextureAttrib::complete_pointers(), set_texcoord_name(), DXShaderContext9::update_shader_vertex_arrays(), DXGeomMunger9::wp_callback(), write(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Returns true if the TextureStage is affected by the setting of the current ColorScaleAttrib, false otherwise.
Definition at line 689 of file textureStage.I.
References uses_color().
Referenced by get_combine_alpha_operand2(), and DXGraphicsStateGuardian9::get_index_type().
|
inline |
Returns true if the TextureStage is relevant to the classic fixed function pipeline.
This excludes texture stages such as normal mapping and the like.
Definition at line 218 of file textureStage.I.
References set_color().
Referenced by TextureAttrib::complete_pointers(), and get_mode().
|
static |
Factory method to generate a TextureStage object.
Definition at line 369 of file textureStage.cxx.
References complete_pointers(), DatagramIterator::get_bool(), get_default(), BamReader::get_file_minor_ver(), DatagramIterator::get_int32(), DatagramIterator::get_string(), DatagramIterator::get_uint8(), LVecBase4f::read_datagram(), BamReader::read_pointer(), and TextureStage().
Referenced by register_with_read_factory().
void TextureStage::operator= | ( | const TextureStage & | copy | ) |
just copy the members of other to this
Definition at line 69 of file textureStage.cxx.
References compare_to().
Referenced by TextureStage().
void TextureStage::output | ( | ostream & | out | ) | const |
Just a single line output.
Definition at line 275 of file textureStage.cxx.
References get_name(), and register_with_read_factory().
Referenced by get_sort_seq(), and write().
|
static |
Factory method to generate a TextureStage object.
Definition at line 359 of file textureStage.cxx.
References BamReader::get_factory(), make_TextureStage(), and Factory< Type >::register_factory().
Referenced by output().
|
inline |
Sets an additional factor that will scale the alpha component after the texture has been applied.
This is used only when the mode is CM_combine.
The only legal values are 1, 2, or 4.
Definition at line 278 of file textureStage.I.
References get_alpha_scale().
Referenced by get_rgb_scale().
|
inline |
Set the color for this stage.
Definition at line 228 of file textureStage.I.
References get_color().
Referenced by is_fixed_function().
|
inline |
Specifies any of the CombineMode values that represent a one-parameter operation.
Specifically, this is CM_replace only.
Definition at line 525 of file textureStage.I.
Referenced by get_combine_rgb_operand2(), and set_combine_alpha().
|
inline |
Specifies any of the CombineMode values that represent a two-parameter operation.
Specifically, this is everything except for CM_replace and CM_interpolate.
Definition at line 551 of file textureStage.I.
References set_combine_alpha().
|
inline |
Specifies any of the CombineMode values that represent a one-parameter operation.
Specifically, this is CM_interpolate only.
Definition at line 578 of file textureStage.I.
References get_combine_alpha_mode().
|
inline |
Specifies any of the CombineMode values that represent a one-parameter operation.
Specifically, this is CM_replace only.
Definition at line 361 of file textureStage.I.
Referenced by get_tex_view_offset(), and set_combine_rgb().
|
inline |
Specifies any of the CombineMode values that represent a two-parameter operation.
Specifically, this is everything except for CM_replace and CM_interpolate.
Definition at line 387 of file textureStage.I.
References set_combine_rgb().
|
inline |
Specifies any of the CombineMode values that represent a one-parameter operation.
Specifically, this is CM_interpolate only.
Definition at line 414 of file textureStage.I.
References get_combine_rgb_mode().
|
inline |
Set the mode of this texture stage.
Definition at line 190 of file textureStage.I.
References get_mode().
Referenced by get_binormal_name().
|
inline |
Changes the name of this texture stage.
Definition at line 42 of file textureStage.I.
References set_sort().
Referenced by get_name().
|
inline |
Changes the relative importance of the texture associated with this stage relative to the other texture stages that are applied simultaneously.
This is unrelated to set_sort(), which controls the order in which multiple textures are applied. The priority number is used to decide which of the requested textures are to be selected for rendering when more textures are requested than the hardware will support. The highest-priority n textures are selected for rendering, and then rendered in order by their sort factor.
Definition at line 96 of file textureStage.I.
References get_priority().
Referenced by get_sort().
|
inline |
Sets an additional factor that will scale all three r, g, b components after the texture has been applied.
This is used only when the mode is CM_combine.
The only legal values are 1, 2, or 4.
Definition at line 253 of file textureStage.I.
References get_rgb_scale().
Referenced by get_color().
|
inline |
Sets the saved_result flag.
When this is true, the output of this stage will be supplied as the "last_saved_result" source for any future stages, until the next TextureStage with a saved_result set true is encountered.
This can be used to reuse the results of this texture stage as input to more than one stage later in the pipeline.
The last texture in the pipeline (the one with the highest sort value) should not have this flag set.
Definition at line 310 of file textureStage.I.
References get_saved_result().
Referenced by get_alpha_scale().
|
inline |
Changes the order in which the texture associated with this stage is rendered relative to the other texture stages.
When geometry is rendered with multiple textures, the textures are rendered in order from the lowest sort number to the highest sort number.
Also see set_priority(), which is used to select the most important textures for rendering when some must be omitted because of hardware limitations.
Definition at line 61 of file textureStage.I.
References get_sort().
Referenced by set_name().
|
inline |
Sets the tex_view_offset value.
This is used only when a special multiview texture is bound to the TextureStage, and it selects the particular view of the texture that is to be used.
This value is added to the similar parameter on DisplayRegion to derive the final texture view index that is selected for rendering.
Definition at line 338 of file textureStage.I.
References get_tex_view_offset().
Referenced by get_saved_result().
|
inline |
Indicate which set of UV's this texture stage will use.
Geometry may have any number of associated UV sets, each of which must have a unique name.
Definition at line 125 of file textureStage.I.
Referenced by AssimpLoader::build_graph(), and get_priority().
|
inline |
Indicate which set of UV's this texture stage will use.
Geometry may have any number of associated UV sets, each of which must have a unique name.
Definition at line 137 of file textureStage.I.
References get_texcoord_name().
|
inline |
Returns true if the TextureStage makes use of whatever color is specified in set_color(), false otherwise.
Definition at line 701 of file textureStage.I.
References uses_primary_color().
Referenced by DXGraphicsStateGuardian9::get_index_type(), and involves_color_scale().
|
inline |
Returns true if the TextureStage makes use of the CS_primary_color combine source.
Definition at line 723 of file textureStage.I.
References compare_to(), and get_default().
Referenced by uses_primary_color(), and ShaderGenerator::~ShaderGenerator().
|
inline |
Returns true if the TextureStage makes use of the CS_primary_color combine source.
Definition at line 712 of file textureStage.I.
References uses_last_saved_result().
Referenced by uses_color(), and ShaderGenerator::~ShaderGenerator().
void TextureStage::write | ( | ostream & | out | ) | const |
Writes the details of this stage.
Definition at line 231 of file textureStage.cxx.
References get_alpha_scale(), get_color(), get_combine_alpha_mode(), get_combine_alpha_operand0(), get_combine_alpha_operand1(), get_combine_alpha_operand2(), get_combine_alpha_source0(), get_combine_alpha_source1(), get_combine_alpha_source2(), get_combine_rgb_mode(), get_combine_rgb_operand0(), get_combine_rgb_operand1(), get_combine_rgb_operand2(), get_combine_rgb_source0(), get_combine_rgb_source1(), get_combine_rgb_source2(), get_mode(), get_name(), get_num_combine_alpha_operands(), get_num_combine_rgb_operands(), get_priority(), get_rgb_scale(), get_saved_result(), get_sort(), get_tex_view_offset(), get_texcoord_name(), and output().
Referenced by compare_to().
Function to write the important information in the particular object to a Datagram.
Reimplemented from TypedWritable.
Definition at line 456 of file textureStage.cxx.
References Datagram::add_bool(), Datagram::add_int32(), Datagram::add_string(), Datagram::add_uint8(), get_default(), LVecBase4f::write_datagram(), and BamWriter::write_pointer().
Referenced by complete_pointers().