BlendEquationi
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSG_BLENDEQUATIONI
#define OSG_BLENDEQUATIONI 1
#include <osg/BlendEquation>
namespace osg {
class OSG_EXPORT BlendEquationi : public BlendEquation
{
public :
BlendEquationi();
BlendEquationi(unsigned int buf, Equation equation):
BlendEquation(equation),
_index(buf) {}
BlendEquationi(unsigned int buf, Equation equationRGB, Equation equationAlpha):
BlendEquation(equationRGB, equationAlpha),
_index(buf) {}
BlendEquationi(const BlendEquationi& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
BlendEquation(cm,copyop),
_index(cm._index) {}
META_StateAttribute(osg, BlendEquationi, BLENDEQUATION);
virtual int compare(const StateAttribute& sa) const
{
// Check for equal types, then create the rhs variable
// used by the COMPARE_StateAttribute_Parameter macros below.
COMPARE_StateAttribute_Types(BlendEquationi,sa)
COMPARE_StateAttribute_Parameter(_index);
return BlendEquation::compare(sa);
}
virtual unsigned int getMember() const { return _index; }
void setIndex(unsigned int buf);
unsigned int getIndex() const { return _index; }
virtual void apply(State& state) const;
protected:
virtual ~BlendEquationi();
unsigned int _index;
};
}
#endif
BlendEquation
COMPARE_StateAttribute_Parameter
#define COMPARE_StateAttribute_Parameter(parameter)
Definition StateAttribute:69
COMPARE_StateAttribute_Types
#define COMPARE_StateAttribute_Types(TYPE, rhs_attribute)
Definition StateAttribute:57
osg::BlendEquation::compare
virtual int compare(const StateAttribute &sa) const
Definition BlendEquation:70
osg::BlendEquation::Equation
Equation
Definition BlendEquation:44
osg::BlendEquation::BlendEquation
BlendEquation()
osg::BlendEquationi::compare
virtual int compare(const StateAttribute &sa) const
Definition BlendEquationi:46
osg::BlendEquationi::getIndex
unsigned int getIndex() const
Definition BlendEquationi:64
osg::BlendEquationi::setIndex
void setIndex(unsigned int buf)
osg::BlendEquationi::BlendEquationi
BlendEquationi()
osg::BlendEquationi::getMember
virtual unsigned int getMember() const
Definition BlendEquationi:58
osg::BlendEquationi::apply
virtual void apply(State &state) const
osg::BlendEquationi::BlendEquationi
BlendEquationi(const BlendEquationi &cm, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition BlendEquationi:39
osg::BlendEquationi::BlendEquationi
BlendEquationi(unsigned int buf, Equation equation)
Definition BlendEquationi:29
osg::BlendEquationi::META_StateAttribute
META_StateAttribute(osg, BlendEquationi, BLENDEQUATION)
osg::BlendEquationi::_index
unsigned int _index
Definition BlendEquationi:72
osg::BlendEquationi::~BlendEquationi
virtual ~BlendEquationi()
osg::BlendEquationi::BlendEquationi
BlendEquationi(unsigned int buf, Equation equationRGB, Equation equationAlpha)
Definition BlendEquationi:33
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::StateAttribute
Definition StateAttribute:77
osg::StateAttribute::BLENDEQUATION
@ BLENDEQUATION
Definition StateAttribute:150
osg::State
Definition State:80
osg
Definition AlphaFunc:19
OSG_EXPORT
#define OSG_EXPORT
Definition osg/Export:39