This is the base class for effect techniques.
Inheritance:
Public Methods
-
Technique()
-
virtual const char* techniqueName()
- get the name of this technique
-
virtual const char* techniqueDescription()
- get a brief description of this technique
-
virtual void getRequiredExtensions(std::vector<std::string> &xtensions*/) const
- collect the GL extension strings which are required for this technique to work properly.
-
virtual bool validate(osg::State &) const
- tests whether this technique is valid for the current rendering context.
-
inline virtual void traverse(osg::NodeVisitor &nv, Effect* fx)
- traverse children with multipass if necessary.
-
inline int getNumPasses() const
- get the number of rendering passes defined in this technique
-
inline osg::StateSet* getPassStateSet(int i)
- get the StateSet object associated to the i-th pass
-
inline const osg::StateSet* getPassStateSet(int i) const
- get the const StateSet object associated to the i-th pass
-
inline void dirtyPasses()
- force rebuilding of pass nodes on next traversal
-
inline void traverse(osg::NodeVisitor &nv, Effect* fx)
Protected Methods
-
Technique(const Technique &)
-
virtual ~Technique()
-
Technique& operator=(const Technique &)
-
void addPass(osg::StateSet* ss = 0)
- create a new pass node, add it to the technique and associate a StateSet
-
inline virtual osg::Node* getOverrideChild(int)
- optional: return a node that overrides the child node on a specified pass
-
virtual void define_passes() = 0
- define the rendering passes that make up this technique.
-
void traverse_implementation(osg::NodeVisitor &nv, Effect* fx)
- traverse children with multipass if necessary.
Documentation
This is the base class for effect techniques. A technique represents one
of the possible ways to implement a special effect. This base class is
abstract, you will have to subclass your own techniques for your custom
effects.
Derived classes will have to implement the define_passes() method to
configure the rendering pass(es) that make up the technique. Usually
you will create one StateSet object for each rendering pass and then
you'll call addPass(stateset).
The validate() method should return true if the technique is valid within
the current rendering context, false otherwise. The default implementation
of validate() calls getRequiredExtensions() and tests whether all required
extensions are supported or not, returning false if at least one extension
is not supported.
- Technique()
- virtual const char* techniqueName()
- get the name of this technique
- virtual const char* techniqueDescription()
- get a brief description of this technique
- virtual void getRequiredExtensions(std::vector<std::string> &xtensions*/) const
-
collect the GL extension strings which are required for this technique
to work properly. This method is called from the default implementation
of validate().
- virtual bool validate(osg::State &) const
-
tests whether this technique is valid for the current rendering context.
The default behavior is to call getRequiredExtensions() and check for
extension availability.
- inline virtual void traverse(osg::NodeVisitor &nv, Effect* fx)
-
traverse children with multipass if necessary. By default this method
simply calls the protected method traverse_implementation(); you can
override it to change the default behavior.
Don't call this method directly as it is called by osgFX::Effect
- Technique(const Technique &)
- virtual ~Technique()
- Technique& operator=(const Technique &)
- void addPass(osg::StateSet* ss = 0)
- create a new pass node, add it to the technique and associate a StateSet
- inline virtual osg::Node* getOverrideChild(int)
- optional: return a node that overrides the child node on a specified pass
- virtual void define_passes() = 0
-
define the rendering passes that make up this technique. You must
implement this method in derived classes to add the required passes.
- void traverse_implementation(osg::NodeVisitor &nv, Effect* fx)
-
traverse children with multipass if necessary. Don't call this method
directly unless you are in a customized version of traverse().
- inline int getNumPasses() const
- get the number of rendering passes defined in this technique
- inline osg::StateSet* getPassStateSet(int i)
- get the StateSet object associated to the i-th pass
- inline const osg::StateSet* getPassStateSet(int i) const
- get the const StateSet object associated to the i-th pass
- inline void dirtyPasses()
- force rebuilding of pass nodes on next traversal
- inline void traverse(osg::NodeVisitor &nv, Effect* fx)
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.