55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
|
#ifndef OSG_TEXGEN
|
||
|
#define OSG_TEXGEN 1
|
||
|
|
||
|
#include <osg/Export>
|
||
|
#include <osg/GL>
|
||
|
#include <osg/OSG>
|
||
|
#include <osg/Object>
|
||
|
|
||
|
namespace osg {
|
||
|
|
||
|
|
||
|
class Input;
|
||
|
class Output;
|
||
|
|
||
|
class SG_EXPORT TexGen : public Object
|
||
|
{
|
||
|
public :
|
||
|
|
||
|
enum TexGenMode {
|
||
|
OBJECT_LINEAR = GL_OBJECT_LINEAR,
|
||
|
EYE_LINEAR = GL_EYE_LINEAR,
|
||
|
SPHERE_MAP = GL_SPHERE_MAP
|
||
|
};
|
||
|
|
||
|
TexGen( void );
|
||
|
static TexGen* instance();
|
||
|
virtual Object* clone() const { return new TexGen(); }
|
||
|
virtual bool isSameKindAs(Object* obj) { return dynamic_cast<TexGen*>(obj)!=NULL; }
|
||
|
virtual const char* className() const { return "TexGen"; }
|
||
|
|
||
|
static void enable( void );
|
||
|
static void disable( void );
|
||
|
|
||
|
void apply( void );
|
||
|
|
||
|
void setMode( TexGenMode mode ) { _mode = mode; }
|
||
|
|
||
|
protected :
|
||
|
|
||
|
virtual ~TexGen( void );
|
||
|
|
||
|
virtual bool readLocalData(Input& fr);
|
||
|
virtual bool writeLocalData(Output& fw);
|
||
|
|
||
|
bool matchModeStr(const char* str,TexGenMode& mode);
|
||
|
const char* getModeStr(TexGenMode mode);
|
||
|
|
||
|
TexGenMode _mode;
|
||
|
|
||
|
};
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif
|