44 lines
992 B
Plaintext
44 lines
992 B
Plaintext
#ifndef OSG_TEXENV
|
|
#define OSG_TEXENV 1
|
|
|
|
#include <osg/GL>
|
|
#include <osg/StateAttribute>
|
|
|
|
namespace osg {
|
|
|
|
/** TexEnv - encapsulates the OpenGL glTexEnv (texture environment) state.*/
|
|
class SG_EXPORT TexEnv : public StateAttribute
|
|
{
|
|
public :
|
|
|
|
TexEnv( void );
|
|
virtual Object* clone() const { return new TexEnv(); }
|
|
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const TexEnv*>(obj)!=0L; }
|
|
virtual const char* className() const { return "TexEnv"; }
|
|
|
|
virtual const Type getType() const { return TEXENV; }
|
|
|
|
enum Mode {
|
|
DECAL = GL_DECAL,
|
|
MODULATE = GL_MODULATE,
|
|
BLEND = GL_BLEND,
|
|
REPLACE = GL_REPLACE
|
|
};
|
|
|
|
void setMode( const Mode mode );
|
|
|
|
const Mode getMode() const { return _mode; }
|
|
|
|
virtual void apply(State& state) const;
|
|
|
|
protected :
|
|
|
|
virtual ~TexEnv( void );
|
|
|
|
Mode _mode;
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|