Addition of Mode mode=MODULATE constructor.

This commit is contained in:
Robert Osfield 2003-12-09 12:05:50 +00:00
parent bbde1b2ae7
commit 6d5eb79804
2 changed files with 11 additions and 10 deletions

View File

@ -25,7 +25,15 @@ class SG_EXPORT TexEnv : public StateAttribute
{
public :
TexEnv();
enum Mode {
DECAL = GL_DECAL,
MODULATE = GL_MODULATE,
BLEND = GL_BLEND,
REPLACE = GL_REPLACE,
ADD = GL_ADD
};
TexEnv(Mode mode=MODULATE);
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
TexEnv(const TexEnv& texenv,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
@ -52,13 +60,6 @@ class SG_EXPORT TexEnv : public StateAttribute
return 0; // passed all the above comparison macro's, must be equal.
}
enum Mode {
DECAL = GL_DECAL,
MODULATE = GL_MODULATE,
BLEND = GL_BLEND,
REPLACE = GL_REPLACE,
ADD = GL_ADD
};
void setMode( Mode mode ) { _mode = mode; }

View File

@ -15,9 +15,9 @@
using namespace osg;
TexEnv::TexEnv()
TexEnv::TexEnv(Mode mode)
{
_mode = MODULATE;
_mode = mode;
_color.set(0.0f,0.0f,0.0f,0.0f);
}