15#ifndef OSGFX_TECHNIQUE_
16#define OSGFX_TECHNIQUE_
32#define META_Technique(name, description) \
33 inline virtual const char *techniqueName() { return name; } \
34 inline virtual const char *techniqueDescription() { return description; }
104 inline void dirtyPasses();
125 typedef std::vector<osg::ref_ptr<osg::StateSet> > Pass_list;
126 OpenThreads::Mutex _mutex;
127 OpenThreads::Atomic _passesDefined;
135 return _passesDefined!=0 ?
static_cast<int>(_passes.size()) : 0;
140 return _passesDefined!=0 ? _passes[i].get() : 0;
145 return _passesDefined!=0 ? _passes[i].get() : 0;
150 OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _mutex);
151 _passesDefined.exchange(0);
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
The osgFX library is a NodeKit that extends the core scene graph to provide a special effects framewo...
Definition AnisotropicLighting:25
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Base class for providing reference counted objects.
Definition Referenced:44
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
Stores a set of modes and attributes which represent a set of OpenGL state.
Definition StateSet:46
The base class for special effects.
Definition Effect:66
Technique & operator=(const Technique &)
Definition Technique:101
virtual const char * techniqueName()
get the name of this Technique
Definition Technique:62
int getNumPasses() const
get the number of rendering passes defined in this Technique
Definition Technique:133
virtual void define_passes()=0
define the rendering passes that make up this technique.
virtual void getRequiredExtensions(std::vector< std::string > &) const
collect the GL extension strings which are required for this technique to work properly.
Definition Technique:72
void traverse_implementation(osg::NodeVisitor &nv, Effect *fx)
traverse children with multipass if necessary.
virtual bool validate(osg::State &) const
tests whether this technique is valid for the current rendering context.
Technique(const Technique &)
Definition Technique:99
virtual void traverse(osg::NodeVisitor &nv, Effect *fx)
traverse children with multipass if necessary.
Definition Technique:155
virtual osg::Node * getOverrideChild(int)
optional: return a node that overrides the child node on a specified pass
Definition Technique:110
osg::StateSet * getPassStateSet(int i)
get the StateSet object associated to the i-th pass
Definition Technique:138
virtual ~Technique()
Definition Technique:100
virtual const char * techniqueDescription()
get a brief description of this Technique
Definition Technique:65
void addPass(osg::StateSet *ss=0)
create a new pass node, add it to the technique and associate a StateSet
void dirtyPasses()
force rebuilding of pass nodes on next traversal
Definition Technique:148
#define OSGFX_EXPORT
Definition Export:27