#include <sglTexCombinerParams.hpp>
Inheritance diagram for sglTexCombinerParams::

Public Types | |
| enum | ArgEnum { eARG0 = 0, eARG1, eARG2 } |
| enum | SourceEnum { eTEXTURE = GL_TEXTURE, eCONSTANT = GL_CONSTANT, ePRIMARY_COLOR = GL_PRIMARY_COLOR, ePREVIOUS = GL_PREVIOUS } |
Public Methods | |
| sglTexCombinerParams () | |
| virtual | ~sglTexCombinerParams () |
| sglTexCombinerParams (const sglTexCombinerParams &rhs) | |
| sglTexCombinerParams& | operator= (const sglTexCombinerParams &rhs) |
| void | setRGBFunc (RGB::FuncEnum func) |
| RGB::FuncEnum | getRGBFunc () const |
| void | setAlphaFunc (Alpha::FuncEnum func) |
| Alpha::FuncEnum | getAlphaFunc () const |
| void | setRGBScale (float scale) |
| float | getRGBScale () const |
| void | setAlphaScale (float scale) |
| float | getAlphaScale () const |
| void | setRGBParameter (ArgEnum arg, SourceEnum src, RGB::OperandEnum op) |
| void | getRGBParameter (ArgEnum arg, SourceEnum &src, RGB::OperandEnum &op) const |
| void | setAlphaParameter (ArgEnum arg, SourceEnum src, Alpha::OperandEnum op) |
| void | getAlphaParameter (ArgEnum arg, SourceEnum &src, Alpha::OperandEnum &op) const |
| virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Friends | |
| class | sglTexEnv |
Example 1: To emulate the eBLEND mode,
sglTexEnv *tenv = new sglTexEnv;
tenv->setBlendColor(1.0f, 0.7f, 0.0f, 1.0f);
tenv->setMode(sglTexEnv::eCOMBINE);
combiner_params = new sglTexCombinerParams();
combiner_params->setRGBFunc(sglTexCombinerParams::RGB::eINTERPOLATE);
combiner_params->setRGBParameter(sglTexCombinerParams::eARG0,
sglTexCombinerParams::eCONSTANT,
sglTexCombinerParams::RGB::eSRC_COLOR);
combiner_params->setRGBParameter(sglTexCombinerParams::eARG1,
sglTexCombinerParams::ePREVIOUS,
sglTexCombinerParams::RGB::eSRC_COLOR);
combiner_params->setRGBParameter(sglTexCombinerParams::eARG2,
sglTexCombinerParams::eTEXTURE,
sglTexCombinerParams::RGB::eSRC_COLOR);
combiner_params->setAlphaFunc(sglTexCombinerParams::Alpha::eMODULATE);
combiner_params->setAlphaParameter(
sglTexCombinerParams::eARG0,
sglTexCombinerParams::ePREVIOUS,
sglTexCombinerParams::Alpha::eSRC_ALPHA);
combiner_params->setAlphaParameter(
sglTexCombinerParams::eARG1,
sglTexCombinerParams::eTEXTURE,
sglTexCombinerParams::Alpha::eSRC_ALPHA);
tenv->setCombinerParams(combiner_params);
Example 2: To emulate the eDECAL mode,
sglTexEnv *tenv = new sglTexEnv;
tenv->setMode(sglTexEnv::eCOMBINE);
combiner_params = new sglTexCombinerParams();
combiner_params->setRGBFunc(sglTexCombinerParams::RGB::eINTERPOLATE);
combiner_params->setRGBParameter(sglTexCombinerParams::eARG0,
sglTexCombinerParams::eTEXTURE,
sglTexCombinerParams::RGB::eSRC_COLOR);
combiner_params->setRGBParameter(sglTexCombinerParams::eARG1,
sglTexCombinerParams::ePREVIOUS,
sglTexCombinerParams::RGB::eSRC_COLOR);
combiner_params->setRGBParameter(sglTexCombinerParams::eARG2,
sglTexCombinerParams::eTEXTURE,
sglTexCombinerParams::RGB::eSRC_ALPHA);
combiner_params->setAlphaFunc(sglTexCombinerParams::Alpha::eREPLACE);
combiner_params->setAlphaParameter(
sglTexCombinerParams::eARG0,
sglTexCombinerParams::ePREVIOUS,
sglTexCombinerParams::Alpha::eSRC_ALPHA);
tenv->setCombinerParams(combiner_params);
Definition at line 94 of file sglTexCombinerParams.hpp.
|
|
Tokens to specify the source for each argument of the texture functions.
Definition at line 185 of file sglTexCombinerParams.hpp. |
|
|
Default constructor. |
|
|
Virtual destructor.
|
|
|
Copy constructor.
|
|
|
Assignment operator.
|
|
|
Set the texture function for the RGB components.
|
|
|
Query the current texture function for the RGB components.
Definition at line 229 of file sglTexCombinerParams.hpp. |
|
|
Set the texture function for the Alpha component.
|
|
|
Query the current texture function for the Alpha component.
Definition at line 241 of file sglTexCombinerParams.hpp. |
|
|
The result of the RGB texture function may be scaled by 1.0, 2.0 or 4.0.
|
|
|
Query the current RGB scale factor.
Definition at line 252 of file sglTexCombinerParams.hpp. |
|
|
The result of the Alpha texture function may be scaled by 1.0, 2.0 or 4.0.
|
|
|
Query the current Alpha scale factor.
Definition at line 264 of file sglTexCombinerParams.hpp. |
|
|
Change one of the arguments of the RGB texture function. The default values: ARG0 = eTEXTURE, eSRC_COLOR; ARG1 = ePREVIOUS, eSRC_COLOR; ARG2 = eCONSTANT, eSRC_ALPHA;
|
|
|
Query one of the arguments of the RGB texture function.
|
|
|
Change one of the arguments of the Alpha texture function. The default values: ARG0 = eTEXTURE, eSRC_ALPHA; ARG1 = ePREVIOUS, eSRC_ALPHA; ARG2 = eCONSTANT, eSRC_ALPHA;
|
|
|
Query one of the arguments of the Alpha texture function.
|
|
|
Output the state of this node to the specified ostream.
Reimplemented from sglObject. |
1.2.6 written by Dimitri van Heesch,
© 1997-2001