class SG_EXPORT osg::StateAttribute

Base class for state attribuets

Inheritance:


Public Classes

[more]enum Values
list values which can be used in to set either GLModeValues or OverrideValues.
[more]enum Types
Values of StateAttribute::Type used to aid identification of different StateAttribute subclasses.
[more]struct ModeUsage

Public Methods

[more] StateAttribute()
[more] StateAttribute(const StateAttribute& sa, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
[more]virtual Object* cloneType() const
Clone the type of an attribute, with Object* return type.
[more]virtual Object* clone(const CopyOp&) const
Clone an attribute, 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* libraryName() const
return the name of the attribute's library
[more]virtual const char* className() const
return the name of the attribute's class type
[more]virtual Type getType() const
return the Type identifier of the attribute's class type
[more]virtual bool isTextureAttribute() const
return true if StateAttribute is a type which controls texturing and needs to be issued wrt to specific texture unit
[more]virtual int compare(const StateAttribute& sa) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
[more]bool operator < (const StateAttribute& rhs) const
[more]bool operator == (const StateAttribute& rhs) const
[more]bool operator != (const StateAttribute& rhs) const
[more]virtual bool getModeUsage(ModeUsage&) const
return the modes associated with this StateAttribute
[more]virtual void apply(State&) const
apply the OpenGL state attributes.
[more]virtual void compileGLObjects(State&) const
default to nothing to compile - all state is applied immediately.
[more]virtual void releaseGLObjects(State* =0) const
release an OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objexts for all graphics context if State object pointer NULL

Public

[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]typedef unsigned int Type
Type identifier to differentiate between different state types.

Protected Methods

[more]virtual ~StateAttribute()


Inherited from Object:

Public Classes

oenum DataVariance

Public Methods

oinline void setDataVariance(DataVariance dv)
oinline DataVariance getDataVariance() const
oinline void setUserData(Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (const Referenced&)
ostatic void setDeleteHandler(DeleteHandler* handler)
ostatic DeleteHandler* getDeleteHandler()
oinline void ref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline void unref() const

Protected Fields

omutable OpenThreads::Mutex _refMutex
omutable int _refCount


Documentation

Base class for state attribuets
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 specify 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 conjunction 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, so that state below it is overriden

o PROTECTED
Protecting of GLMode's os StateAttributes is enabled, so that state from above connot override this and below state

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

otypedef unsigned int Type
Type identifier to differentiate between different state types.

oenum Types
Values of StateAttribute::Type used to aid identification of different 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 TEXTURE

o POLYGONMODE

o POLYGONOFFSET

o MATERIAL

o ALPHAFUNC

o ANTIALIAS

o COLORTABLE

o CULLFACE

o FOG

o FRONTFACE

o LIGHT

o LIGHT_0

o LIGHT_1

o LIGHT_2

o LIGHT_3

o LIGHT_4

o LIGHT_5

o LIGHT_6

o LIGHT_7

o POINT

o LINEWIDTH

o LINESTIPPLE

o POLYGONSTIPPLE

o SHADEMODEL

o TEXENV

o TEXGEN

o TEXMAT

o LIGHTMODEL

o BLENDFUNC

o STENCIL

o COLORMASK

o DEPTH

o VIEWPORT

o BLENDCOLOR

o MULTISAMPLE

o CLIPPLANE

o CLIPPLANE_0

o CLIPPLANE_1

o CLIPPLANE_2

o CLIPPLANE_3

o CLIPPLANE_4

o CLIPPLANE_5

o COLORMATRIX

o VERTEXPROGRAM

o FRAGMENTPROGRAM

o PROGRAMOBJECT

o StateAttribute()

o StateAttribute(const StateAttribute& sa, const CopyOp& copyop=CopyOp::SHALLOW_COPY)

ovirtual Object* cloneType() const
Clone the type of an attribute, with Object* return type. Must be defined by derived classes.

ovirtual Object* clone(const CopyOp&) const
Clone an attribute, with Object* return type. Must be defined by derived classes.

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

ovirtual const char* libraryName() const
return the name of the attribute's library

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

ovirtual Type getType() const
return the Type identifier of the attribute's class type

ovirtual bool isTextureAttribute() const
return true if StateAttribute is a type which controls texturing and needs to be issued wrt to specific texture unit

ovirtual int compare(const StateAttribute& sa) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

obool operator < (const StateAttribute& rhs) const

obool operator == (const StateAttribute& rhs) const

obool operator != (const StateAttribute& rhs) const

ostruct ModeUsage

ovirtual void usesMode(GLMode mode)

ovirtual void usesTextureMode(GLMode mode)

ovirtual bool getModeUsage(ModeUsage&) const
return the modes associated with this StateAttribute

ovirtual void apply(State&) const
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 compileGLObjects(State&) const
default to nothing to compile - all state is applied immediately.

ovirtual void releaseGLObjects(State* =0) const
release an OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objexts for all graphics context if State object pointer NULL

ovirtual ~StateAttribute()


Direct child classes:
Viewport
VertexProgram
Texture
TexMat
TexGen
TexEnvCombine
TexEnv
Stencil
ShadeModel
PolygonStipple
PolygonOffset
PolygonMode
PointSprite
Point
Multisample
Material
LineWidth
LineStipple
LightModel
Light
FrontFace
FragmentProgram
Fog
Depth
CullFace
ColorMatrix
ColorMask
ClipPlane
BlendFunc
BlendColor
AlphaFunc

Alphabetic index HTML hierarchy of classes or Java



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