class SG_EXPORT osg::StateAttribute

Base class for state attribues

Inheritance:


Public Methods

[more] StateAttribute()
[more]virtual Object* clone() const = 0
return a shallow copy of a node, with Object* return type
[more]virtual bool isSameKindAs(const Object* obj) const
return true if this and obj are of the same kind of object
[more]virtual const char* className() const
return the name of the attribute's class type
[more]virtual const Type getType() const = 0
return the Type idenitifer of the attribute's class type
[more]virtual void setStateSetModes(StateSet&, const GLModeValue) const
[more]virtual void apply(State&) const = 0
apply the OpenGL state attributes.
[more]virtual void compile(State&) const
default to nothing to compile - all state is applied immediately.

Public Members

[more]typedef GLenum GLMode
GLMode is the value used in glEnable/glDisable(mode)
[more]typedef unsigned int GLModeValue
GLModeValue is used to specified whether an mode is enabled (ON) or disabled (OFF).
[more]typedef unsigned int OverrideValue
Override is used to specified the override behavior of StateAttributes from from parent to children.
[more]enum Values
list values which can be used in to set either GLModeValues or OverrideValues.
[more]enum Type
Values of StateAttribute::Type used to aid identification of diffenent StateAttribute subclasses.

Protected Methods

[more]virtual ~StateAttribute()


Inherited from Object:


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


Documentation

Base class for state attribues
otypedef GLenum GLMode
GLMode is the value used in glEnable/glDisable(mode)

otypedef unsigned int GLModeValue
GLModeValue is used to specified whether an mode is enabled (ON) or disabled (OFF). GLMoveValue is also used to speficy the override behavior of modes from parent to children. See enum Value description for more details.

otypedef unsigned int OverrideValue
Override is used to specified the override behavior of StateAttributes from from parent to children. See enum Value description for more details.

oenum Values
list values which can be used in to set either GLModeValues or OverrideValues. When using in conjection with GLModeValues all Values have meaning. When using in conjection with StateAttribute OverrideValue only OFF,OVERRIDE and INHERIT are meaningful. However, they are useful when using GLModeValue and OverrideValue in conjunction with each other as when using StateSet::setAttributeAndModes(..).

o OFF
means that associated GLMode and Override is disabled

o ON
means that associated GLMode is enabled and Override is disabled

o OVERRIDE
Overriding of GLMode's or StateAttributes is enabled

o OVERRIDE_OFF
means that associated GLMode is disabled and Override is enabled

o OVERRIDE_ON
means that associated GLMode and Override is enabled

o INHERIT
means that GLMode or StateAttribute should in inherited from above

oenum Type
Values of StateAttribute::Type used to aid identification of diffenent StateAttribute subclasses. Each subclass defines it own value in the virtual Type getType() method. When extending the osg's StateAttribute's simply define your own Type value which is unique, using the StateAttribute::Type enum as a guide of what values to use. If your new subclass needs to override a standard StateAttriubte then simple use that types value.

o ALPHAFUNC

o ANTIALIAS

o COLORTABLE

o CULLFACE

o FOG

o FRONTFACE

o LIGHTING

o MATERIAL

o POINT

o POLYGONMODE

o POLYGONOFFSET

o TEXENV

o TEXGEN

o TEXMAT

o TEXTURE

o TEXTURE_0

o TEXTURE_1

o TEXTURE_2

o TEXTURE_3

o TRANSPARENCY

o STENCIL

o COLORMASK

o CLIPPLANE

o CLIPPLANE_0

o CLIPPLANE_1

o CLIPPLANE_2

o CLIPPLANE_3

o CLIPPLANE_4

o CLIPPLANE_5

o DEPTH

o StateAttribute()

ovirtual Object* clone() const = 0
return a shallow copy of a node, with Object* return type

ovirtual bool isSameKindAs(const Object* obj) const
return true if this and obj are of the same kind of object

ovirtual const char* className() const
return the name of the attribute's class type

ovirtual const Type getType() const = 0
return the Type idenitifer of the attribute's class type

ovirtual void setStateSetModes(StateSet&, const GLModeValue) const

ovirtual void apply(State&) const = 0
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.

ovirtual void compile(State&) const
default to nothing to compile - all state is applied immediately.

ovirtual ~StateAttribute()


Direct child classes:
Transparency
Texture
TexMat
TexGen
TexEnv
Stencil
PolygonOffset
PolygonMode
Point
Material
Light
FrontFace
Fog
Depth
CullFace
ColorMask
ClipPlane
AlphaFunc

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.