OpenSceneGraph/src/osg/TexEnv.cpp

29 lines
392 B
C++
Raw Normal View History

2001-01-11 00:32:10 +08:00
#include "osg/TexEnv"
using namespace osg;
TexEnv::TexEnv()
2001-01-11 00:32:10 +08:00
{
_mode = MODULATE;
}
TexEnv::~TexEnv()
2001-01-11 00:32:10 +08:00
{
}
void TexEnv::setMode( const Mode mode )
2001-01-11 00:32:10 +08:00
{
_mode = (mode == DECAL ||
mode == MODULATE ||
mode == BLEND ||
mode == REPLACE ) ?
mode : MODULATE;
2001-01-11 00:32:10 +08:00
}
void TexEnv::apply(State&) const
2001-01-11 00:32:10 +08:00
{
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, _mode);
2001-01-11 00:32:10 +08:00
}