osg::ClampColor Class Reference

Inheritance diagram for osg::ClampColor:

osg::StateAttribute osg::Object osg::Referenced List of all members.

Public Types

 CLAMP_VERTEX_COLOR = GL_CLAMP_VERTEX_COLOR_ARB
 CLAMP_FRAGMENT_COLOR = GL_CLAMP_FRAGMENT_COLOR_ARB
 CLAMP_READ_COLOR = GL_CLAMP_READ_COLOR_ARB
 FIXED_ONLY = GL_FIXED_ONLY_ARB
 FALSE = GL_FALSE
 TRUE = GL_TRUE
enum  Target { CLAMP_VERTEX_COLOR = GL_CLAMP_VERTEX_COLOR_ARB, CLAMP_FRAGMENT_COLOR = GL_CLAMP_FRAGMENT_COLOR_ARB, CLAMP_READ_COLOR = GL_CLAMP_READ_COLOR_ARB }
enum  Mode { FIXED_ONLY = GL_FIXED_ONLY_ARB, FALSE = GL_FALSE, TRUE = GL_TRUE }

Public Member Functions

 ClampColor ()
 ClampColor (Target target, Mode mode)
 ClampColor (const ClampColor &trans, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_StateAttribute (osg, ClampColor, CLAMPCOLOR)
virtual int compare (const StateAttribute &sa) const
void setTarget (Target target)
Target getTarget () const
void setMode (Mode mode)
Mode getMode () const
virtual void apply (State &state) const

Static Public Member Functions

static ExtensionsgetExtensions (unsigned int contextID, bool createIfNotInitalized)
static void setExtensions (unsigned int contextID, Extensions *extensions)

Protected Member Functions

virtual ~ClampColor ()

Protected Attributes

Target _target
Mode _mode

Classes

class  Extensions

Detailed Description

Encapsulates OpenGL ClampColor state.


Member Enumeration Documentation

enum osg::ClampColor::Mode

Enumerator:
FIXED_ONLY 
FALSE 
TRUE 

enum osg::ClampColor::Target

Enumerator:
CLAMP_VERTEX_COLOR 
CLAMP_FRAGMENT_COLOR 
CLAMP_READ_COLOR 


Constructor & Destructor Documentation

osg::ClampColor::ClampColor (  ) 

osg::ClampColor::ClampColor ( Target  target,
Mode  mode 
)

osg::ClampColor::ClampColor ( const ClampColor trans,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
) [inline]

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::ClampColor::~ClampColor (  )  [protected, virtual]


Member Function Documentation

virtual void osg::ClampColor::apply ( State state  )  const [virtual]

apply the OpenGL state attributes. The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.

Implements osg::StateAttribute.

virtual int osg::ClampColor::compare ( const StateAttribute sa  )  const [inline, virtual]

Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

static Extensions* osg::ClampColor::getExtensions ( unsigned int  contextID,
bool  createIfNotInitalized 
) [static]

Returns the Extensions object for the given context. If createIfNotInitalized is true and the Exentsions object doesn't exist, getExtensions() creates it on the given context. Returns NULL if createIfNotInitalized is false and the Extensions object doesn't exist.

Mode osg::ClampColor::getMode (  )  const [inline]

Target osg::ClampColor::getTarget (  )  const [inline]

osg::ClampColor::META_StateAttribute ( osg  ,
ClampColor  ,
CLAMPCOLOR   
)

static void osg::ClampColor::setExtensions ( unsigned int  contextID,
Extensions extensions 
) [static]

setExtensions() allows users to override the extensions across graphics contexts. Typically used when you have different extensions supported across graphics pipes, but need to ensure that they all use the same low common denominator extensions.

void osg::ClampColor::setMode ( Mode  mode  )  [inline]

void osg::ClampColor::setTarget ( Target  target  )  [inline]


Member Data Documentation

Mode osg::ClampColor::_mode [protected]

Target osg::ClampColor::_target [protected]


The documentation for this class was generated from the following file:
Generated on Thu Sep 28 18:43:35 2006 for openscenegraph by  doxygen 1.4.7