OpenSceneGraph
Classes | Namespaces | Macros
StateAttribute File Reference
#include <osg/Export>
#include <osg/Object>
#include <osg/Callback>
#include <osg/Shader>
#include <osg/GL>
#include <typeinfo>
#include <utility>
#include <vector>

Classes

class  osg::StateAttribute
 Base class for state attributes. More...
 
struct  osg::StateAttribute::ModeUsage
 
struct  osg::StateAttribute::ReassignToParents
 Helper class that make is easy to handle changes in a member value. More...
 

Namespaces

 osg
 The core osg library provides the basic scene graph classes such as Nodes, State and Drawables, and maths and general helper classes.
 

Macros

#define OSG_STATEATTRIBUTE   1
 
#define GL_COLOR_SUM   0x8458
 
#define META_StateAttribute(library, name, type)
 META_StateAttribute macro define the standard clone, isSameKindAs, className and getType methods. More...
 
#define COMPARE_StateAttribute_Types(TYPE, rhs_attribute)
 COMPARE_StateAttribute_Types macro is a helper for implementing the StateAtribute::compare(..) method. More...
 
#define COMPARE_StateAttribute_Parameter(parameter)
 COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare(..) method. More...
 

Macro Definition Documentation

◆ COMPARE_StateAttribute_Parameter

#define COMPARE_StateAttribute_Parameter (   parameter)
Value:
if (parameter<rhs.parameter) return -1; \
if (rhs.parameter<parameter) return 1;

COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare(..) method.

Macro assumes that variable rhs has been correctly defined by preceding code macro.

Referenced by osg::LineWidth::compare(), osg::ColorMatrix::compare(), osg::Capability::compare(), osg::LightModel::compare(), osg::ColorMaski::compare(), osg::ViewportIndexed::compare(), osg::PatchParameter::compare(), osg::BlendColor::compare(), osg::TexMat::compare(), osg::FrontFace::compare(), osg::PolygonOffset::compare(), osg::TexEnvFilter::compare(), osg::DepthRangeIndexed::compare(), osg::LineStipple::compare(), osg::Scissor::compare(), osg::CullFace::compare(), osg::BlendFunci::compare(), osg::BlendEquationi::compare(), osg::VertexAttribDivisor::compare(), osg::Hint::compare(), osgFX::Validator::compare(), osg::ScissorIndexed::compare(), osg::ColorMask::compare(), osg::ShadeModel::compare(), osg::Point::compare(), osg::Viewport::compare(), osg::TexEnv::compare(), osg::AlphaFunc::compare(), osg::ClipControl::compare(), osg::Depth::compare(), osg::TexGen::compare(), osg::PolygonMode::compare(), osg::ClampColor::compare(), osg::Material::compare(), osg::Stencil::compare(), osg::ClipPlane::compare(), osg::Multisample::compare(), osg::BlendEquation::compare(), osg::Light::compare(), osg::Fog::compare(), osg::LogicOp::compare(), osg::BlendFunc::compare(), osg::Capabilityi::compare(), osg::TexEnvCombine::compare(), osg::UniformBufferBinding::compare(), osg::FragmentProgram::compare(), osg::VertexProgram::compare(), osg::TransformFeedbackBufferBinding::compare(), osg::AtomicCounterBufferBinding::compare(), and osg::ShaderStorageBufferBinding::compare().

◆ COMPARE_StateAttribute_Types

#define COMPARE_StateAttribute_Types (   TYPE,
  rhs_attribute 
)
Value:
if (this==&rhs_attribute) return 0;\
const std::type_info* type_lhs = &typeid(*this);\
const std::type_info* type_rhs = &typeid(rhs_attribute);\
if (type_lhs->before(*type_rhs)) return -1;\
if (*type_lhs != *type_rhs) return 1;\
const TYPE& rhs = static_cast<const TYPE&>(rhs_attribute);

COMPARE_StateAttribute_Types macro is a helper for implementing the StateAtribute::compare(..) method.

Referenced by osg::LineWidth::compare(), osg::ColorMatrix::compare(), osg::Capability::compare(), osg::LightModel::compare(), osg::ColorMaski::compare(), osg::ViewportIndexed::compare(), osg::PatchParameter::compare(), osg::BlendColor::compare(), osg::TexMat::compare(), osg::FrontFace::compare(), osg::PolygonOffset::compare(), osg::TexEnvFilter::compare(), osg::DepthRangeIndexed::compare(), osg::LineStipple::compare(), osg::Scissor::compare(), osg::CullFace::compare(), osg::BlendFunci::compare(), osg::BlendEquationi::compare(), osg::VertexAttribDivisor::compare(), osg::Hint::compare(), osgFX::Validator::compare(), osg::ScissorIndexed::compare(), osg::ColorMask::compare(), osg::ShadeModel::compare(), osg::Point::compare(), osg::Viewport::compare(), osg::TexEnv::compare(), osg::AlphaFunc::compare(), osg::ClipControl::compare(), osg::Depth::compare(), osg::TexGen::compare(), osg::PolygonMode::compare(), osg::ClampColor::compare(), osg::Material::compare(), osg::Stencil::compare(), osg::ClipPlane::compare(), osg::Multisample::compare(), osg::BlendEquation::compare(), osg::Light::compare(), osg::Fog::compare(), osg::LogicOp::compare(), osg::BlendFunc::compare(), osg::Capabilityi::compare(), osg::TexEnvCombine::compare(), osg::UniformBufferBinding::compare(), osg::FragmentProgram::compare(), osg::VertexProgram::compare(), osg::TransformFeedbackBufferBinding::compare(), osg::AtomicCounterBufferBinding::compare(), and osg::ShaderStorageBufferBinding::compare().

◆ GL_COLOR_SUM

#define GL_COLOR_SUM   0x8458

◆ META_StateAttribute

#define META_StateAttribute (   library,
  name,
  type 
)
Value:
virtual osg::Object* cloneType() const { return new name(); } \
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
virtual const char* libraryName() const { return #library; } \
virtual const char* className() const { return #name; } \
virtual Type getType() const { return type; }
#define NULL
Definition: Export:55
Base class/standard interface for objects which require IO support, cloning and reference counting...
Definition: Object:60
T * clone(const T *t, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition: Object:323
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition: CopyOp:41
T * cloneType(const T *t)
Definition: Object:365

META_StateAttribute macro define the standard clone, isSameKindAs, className and getType methods.

Use when subclassing from Object to make it more convenient to define the standard pure virtual methods which are required for all Object subclasses.

Referenced by osg::AlphaFunc::AlphaFunc(), osg::BlendColor::BlendColor(), osg::BlendEquation::BlendEquation(), osg::BlendEquationi::BlendEquationi(), osg::BlendFunc::BlendFunc(), osg::BlendFunci::BlendFunci(), osg::ClampColor::ClampColor(), osg::ColorMask::ColorMask(), osg::ColorMaski::ColorMaski(), osg::ColorMatrix::ColorMatrix(), osg::CullFace::CullFace(), osg::Depth::Depth(), osg::DepthRangeIndexed::DepthRangeIndexed(), osg::Fog::Fog(), osg::FrontFace::FrontFace(), osg::LightModel::LightModel(), osg::LineStipple::LineStipple(), osg::LineWidth::LineWidth(), osg::LogicOp::LogicOp(), osg::Material::Material(), osg::Multisample::Multisample(), osg::PatchParameter::PatchParameter(), osg::Point::Point(), osg::PointSprite::PointSprite(), osg::PolygonMode::PolygonMode(), osg::PolygonOffset::PolygonOffset(), osg::Scissor::Scissor(), osg::ScissorIndexed::ScissorIndexed(), osg::ShadeModel::ShadeModel(), osg::Stencil::Stencil(), osg::TexEnvCombine::TexEnvCombine(), osg::TexEnvFilter::TexEnvFilter(), osg::TexMat::TexMat(), osg::Texture1D::Texture1D(), osg::Texture2D::Texture2D(), osg::Texture3D::Texture3D(), osg::TextureRectangle::TextureRectangle(), osg::Viewport::Viewport(), and osg::ViewportIndexed::ViewportIndexed().

◆ OSG_STATEATTRIBUTE

#define OSG_STATEATTRIBUTE   1