openscenegraph
|
Classes | |
struct | ModeUsage |
Protected Member Functions | |
virtual | ~StateAttribute () |
void | addParent (osg::StateSet *object) |
void | removeParent (osg::StateSet *object) |
![]() | |
virtual | ~Object () |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Protected Attributes | |
ParentList | _parents |
ref_ptr< ShaderComponent > | _shaderComponent |
ref_ptr< StateAttributeCallback > | _updateCallback |
ref_ptr< StateAttributeCallback > | _eventCallback |
![]() | |
std::string | _name |
DataVariance | _dataVariance |
osg::UserDataContainer * | _userDataContainer |
![]() | |
OpenThreads::AtomicPtr | _observerSet |
OpenThreads::Atomic | _refCount |
Friends | |
class | osg::StateSet |
Additional Inherited Members | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
Base class for state attributes.
typedef GLenum osg::StateAttribute::GLMode |
GLMode is the value used in glEnable/glDisable(mode)
typedef unsigned int osg::StateAttribute::GLModeValue |
GLModeValue is used to specify whether a 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.
typedef unsigned int osg::StateAttribute::OverrideValue |
Override is used to specify the override behavior of StateAttributes from parent to children. See enum Value description for more details.
typedef std::vector<StateSet*> osg::StateAttribute::ParentList |
A vector of osg::StateSet pointers which is used to store the parent(s) of this StateAttribute.
typedef std::pair<Type,unsigned int> osg::StateAttribute::TypeMemberPair |
Simple pairing between an attribute type and the member within that attribute type group.
Type identifier to differentiate between different state types. Values of StateAttribute::Type used to aid identification of different StateAttribute subclasses. Each subclass defines its 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 simply use that type's value.
TEXTURE | |
POLYGONMODE | |
POLYGONOFFSET | |
MATERIAL | |
ALPHAFUNC | |
ANTIALIAS | |
COLORTABLE | |
CULLFACE | |
FOG | |
FRONTFACE | |
LIGHT | |
POINT | |
LINEWIDTH | |
LINESTIPPLE | |
POLYGONSTIPPLE | |
SHADEMODEL | |
TEXENV | |
TEXENVFILTER | |
TEXGEN | |
TEXMAT | |
LIGHTMODEL | |
BLENDFUNC | |
BLENDEQUATION | |
LOGICOP | |
STENCIL | |
COLORMASK | |
DEPTH | |
VIEWPORT | |
SCISSOR | |
BLENDCOLOR | |
MULTISAMPLE | |
CLIPPLANE | |
COLORMATRIX | |
VERTEXPROGRAM | |
FRAGMENTPROGRAM | |
POINTSPRITE | |
PROGRAM | |
CLAMPCOLOR | |
HINT | |
VALIDATOR |
osgFX namespace |
VIEWMATRIXEXTRACTOR | |
OSGNV_PARAMETER_BLOCK |
osgNV namespace |
OSGNVEXT_TEXTURE_SHADER | |
OSGNVEXT_VERTEX_PROGRAM | |
OSGNVEXT_REGISTER_COMBINERS | |
OSGNVCG_PROGRAM |
osgNVCg namespace |
OSGNVSLANG_PROGRAM | |
OSGNVPARSE_PROGRAM_PARSER | |
UNIFORMBUFFERBINDING | |
TRANSFORMFEEDBACKBUFFERBINDING |
list values which can be used to set either GLModeValues or OverrideValues. When using in conjunction with GLModeValues, all Values have meaning. When using in conjunction 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(..).
OFF |
means that associated GLMode and Override is disabled. |
ON |
means that associated GLMode is enabled and Override is disabled. |
OVERRIDE |
Overriding of GLMode's or StateAttributes is enabled, so that state below it is overridden. |
PROTECTED |
Protecting of GLMode's or StateAttributes is enabled, so that state from above cannot override this and below state. |
INHERIT |
means that GLMode or StateAttribute should be inherited from above. |
osg::StateAttribute::StateAttribute | ( | ) |
|
inline |
|
inlineprotectedvirtual |
|
protected |
apply the OpenGL state attributes. The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.
Reimplemented in osg::Texture, osg::FrameBufferObject, osgText::GlyphTexture, osg::VertexProgram, osg::FragmentProgram, osg::TexEnvCombine, osg::Light, osg::Stencil, osg::BlendFunc, osg::StencilTwoSided, osg::Texture2D, osg::Texture3D, osg::Fog, osg::Texture1D, osg::TextureRectangle, osg::Viewport, osg::Texture2DArray, osg::TextureCubeMap, osg::ClipPlane, osg::LogicOp, osg::BlendEquation, osg::TexGen, osg::Material, osg::Depth, osg::Scissor, osg::Multisample, osg::AlphaFunc, osg::Point, osg::ColorMask, osg::ClampColor, osg::TexEnv, osg::LightModel, osg::PolygonMode, osg::Texture2DMultisample, osg::TexMat, osg::PolygonOffset, osg::BufferIndexBinding, osg::Hint, osg::LineStipple, osg::BlendColor, osg::CullFace, osg::Program, osg::ShadeModel, osg::PointSprite, osg::TexEnvFilter, osg::ColorMatrix, osg::ShaderAttribute, osg::FrontFace, osg::PolygonStipple, osg::LineWidth, and osgFX::Validator.
Referenced by osg::State::applyAttribute(), osg::State::applyAttributeOnTexUnit(), osg::State::applyGlobalDefaultAttribute(), and osg::State::applyGlobalDefaultAttributeOnTexUnit().
|
inlinevirtual |
Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.
Reimplemented in osg::Texture.
|
inlinevirtual |
Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.
Reimplemented in osg::Texture.
|
inlinevirtual |
Check the modes associated with this StateAttribute are supported by current OpenGL drivers, and if not set the associated mode in osg::State to be black listed/invalid. Return true if all associated modes are valid.
Reimplemented in osg::PointSprite.
|
inlinevirtual |
Return the name of the attribute's class type.
Implements osg::Object.
Reimplemented in osg::Texture, osgText::GlyphTexture, osg::Light, osg::ClipPlane, osg::Hint, and osg::ShaderAttribute.
Clone an attribute, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
Implemented in osg::Texture, osg::Light, osg::ClipPlane, osg::Hint, and osg::ShaderAttribute.
|
pure virtual |
Clone the type of an attribute, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
Implemented in osg::Texture, osg::Light, osg::ClipPlane, osg::Hint, and osg::ShaderAttribute.
Referenced by osg::State::applyAttribute(), and osg::State::applyAttributeOnTexUnit().
|
pure virtual |
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Implemented in osg::FrameBufferObject, osgText::GlyphTexture, osg::FragmentProgram, osg::VertexProgram, osg::TransformFeedbackBufferBinding, osg::UniformBufferBinding, osg::TexEnvCombine, osg::BlendFunc, osg::LogicOp, osg::Fog, osg::BlendEquation, osg::Light, osg::Multisample, osg::ClipPlane, osg::Stencil, osg::TexGen, osg::Program, osg::ClampColor, osg::Material, osg::PolygonMode, osg::AlphaFunc, osg::TexEnv, osg::Depth, osg::Viewport, osg::Point, osg::StencilTwoSided, osg::ColorMask, osg::ShadeModel, osg::Hint, osg::PointSprite, osgFX::Validator, osg::CullFace, osg::Scissor, osg::LineStipple, osg::PolygonOffset, osg::TexEnvFilter, osg::Texture1D, osg::TextureRectangle, osg::BlendColor, osg::FrontFace, osg::TexMat, osg::Texture2DMultisample, osg::Texture3D, osg::LightModel, osg::PolygonStipple, osg::Texture2DArray, osg::ShaderAttribute, osg::Texture2D, osg::ColorMatrix, osg::LineWidth, and osg::TextureCubeMap.
Default to nothing to compile - all state is applied immediately.
Reimplemented in osg::Texture, osg::VertexProgram, osg::FragmentProgram, osg::Program, osg::ShaderAttribute, and osgFX::Validator.
|
inline |
Get the non const EventCallback.
|
inline |
Get the const EventCallback.
|
inlinevirtual |
Return the member identifier within the attribute's class type. Used for light number/clip plane number etc.
Reimplemented in osg::Light, osg::ClipPlane, osg::Hint, and osg::BufferIndexBinding.
|
inlinevirtual |
Return the modes associated with this StateAttribute.
Reimplemented in osg::Texture, osg::FragmentProgram, osg::VertexProgram, osg::BlendFunc, osg::Light, osg::Fog, osg::Material, osg::LogicOp, osg::BlendEquation, osg::ClipPlane, osg::Stencil, osg::TexGen, osg::AlphaFunc, osg::Depth, osg::Point, osg::Scissor, osg::CullFace, osg::LineStipple, osg::PolygonOffset, osg::ShaderAttribute, osg::BlendColor, osg::StencilTwoSided, osg::PointSprite, and osg::PolygonStipple.
|
inline |
Get the number of parents of this StateAttribute.
|
inline |
|
inline |
Get a single const parent of this StateAttribute.
i | index of the parent to get. |
|
inline |
Get the parent list of this StateAttribute.
|
inline |
|
inline |
|
pure virtual |
Return the Type identifier of the attribute's class type.
Implemented in osg::Texture, osg::Light, osg::ClipPlane, osg::Hint, and osg::ShaderAttribute.
|
inline |
Return the TypeMemberPair that uniquely identifies this type member.
Referenced by osg::State::applyAttribute(), osg::State::applyTextureAttribute(), osg::State::getAttributeVec(), osg::State::setGlobalDefaultAttribute(), and osg::State::setGlobalDefaultTextureAttribute().
|
inline |
Get the non const UpdateCallback.
|
inline |
Get the const UpdateCallback.
|
inlinevirtual |
Return true if this and obj are of the same kind of object.
Reimplemented from osg::Object.
Reimplemented in osg::Texture, osg::Light, osg::ClipPlane, osg::Hint, and osg::ShaderAttribute.
References NULL.
|
inlinevirtual |
Return true if StateAttribute is a type which controls texturing and needs to be issued w.r.t to specific texture unit.
Reimplemented in osg::Texture, osg::TexEnvCombine, osg::TexGen, osg::PointSprite, osg::TexEnv, osg::TexEnvFilter, and osg::TexMat.
|
inlinevirtual |
Return the name of the attribute's library.
Implements osg::Object.
Reimplemented in osg::Texture, osg::Light, osg::ClipPlane, osg::Hint, and osg::ShaderAttribute.
|
inline |
|
inline |
|
inline |
Release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objects for all graphics context if State object pointer NULL.
Reimplemented from osg::Object.
Reimplemented in osg::Texture, osg::FrameBufferObject, osg::VertexProgram, osg::FragmentProgram, osg::Program, and osg::ShaderAttribute.
|
protected |
|
inlinevirtual |
Resize any per context GLObject buffers to specified size.
Reimplemented from osg::Object.
Reimplemented in osg::Texture, osg::FrameBufferObject, osgText::GlyphTexture, osg::VertexProgram, osg::FragmentProgram, osg::Program, and osg::ShaderAttribute.
void osg::StateAttribute::setEventCallback | ( | StateAttributeCallback * | ec | ) |
Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.
|
inline |
void osg::StateAttribute::setUpdateCallback | ( | StateAttributeCallback * | uc | ) |
Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |