17 #include <osg/StateAttribute>
20 #ifndef GL_FOG_DISTANCE_MODE_NV
21 #define GL_FOG_DISTANCE_MODE_NV 0x855A
23 #ifndef GL_EYE_PLANE_ABSOLUTE_NV
24 #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
26 #ifndef GL_EYE_RADIAL_NV
27 #define GL_EYE_RADIAL_NV 0x855B
31 #ifndef GL_FOG_COORDINATE
32 #define GL_FOG_COORDINATE 0x8451
34 #ifndef GL_FRAGMENT_DEPTH
35 #define GL_FRAGMENT_DEPTH 0x8452
41 #define GL_EXP2 0x0801
45 #define GL_FOG_HINT 0x0C54
62 _density(fog._density),
66 _fogCoordinateSource(fog._fogCoordinateSource),
67 _useRadialFog(fog._useRadialFog) {}
105 inline void setDensity(
float density ) { _density = density; }
108 inline void setStart(
float start ) { _start = start; }
111 inline void setEnd(
float end ) { _end = end; }
112 inline float getEnd()
const {
return _end; }
129 virtual void apply(
State& state)
const;
GLint getFogCoordinateSource() const
#define COMPARE_StateAttribute_Types(TYPE, rhs_attribute)
virtual bool getModeUsage(StateAttribute::ModeUsage &usage) const
#define GL_FRAGMENT_DEPTH
virtual void usesMode(GLMode mode)=0
void setColor(const Vec4 &color)
GLint _fogCoordinateSource
const Vec4 & getColor() const
virtual int compare(const StateAttribute &sa) const
void setDensity(float density)
Fog(const Fog &fog, const CopyOp ©op=CopyOp::SHALLOW_COPY)
void setFogCoordinateSource(GLint source)
#define META_StateAttribute(library, name, type)
#define COMPARE_StateAttribute_Parameter(parameter)
bool getUseRadialFog() const
void setStart(float start)
#define GL_FOG_COORDINATE
void setUseRadialFog(bool useRadialFog)