OSG
3.4.0
|
#include <Technique.h>
Public Member Functions | |
Technique () | |
virtual const char * | techniqueName () |
virtual const char * | techniqueDescription () |
virtual void | getRequiredExtensions (std::vector< std::string > &) const |
virtual bool | validate (osg::State &) const |
int | getNumPasses () const |
osg::StateSet * | getPassStateSet (int i) |
const osg::StateSet * | getPassStateSet (int i) const |
virtual void | traverse (osg::NodeVisitor &nv, Effect *fx) |
![]() | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
bool | getThreadSafeRefUnref () const |
OpenThreads::Mutex * | getRefMutex () const |
int | ref () const |
int | unref () const |
int | unref_nodelete () const |
int | referenceCount () const |
ObserverSet * | getObserverSet () const |
ObserverSet * | getOrCreateObserverSet () const |
void | addObserver (Observer *observer) const |
void | removeObserver (Observer *observer) const |
Protected Member Functions | |
Technique (const Technique &) | |
virtual | ~Technique () |
Technique & | operator= (const Technique &) |
void | dirtyPasses () |
void | addPass (osg::StateSet *ss=0) |
virtual osg::Node * | getOverrideChild (int) |
virtual void | define_passes ()=0 |
void | traverse_implementation (osg::NodeVisitor &nv, Effect *fx) |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Additional Inherited Members | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
![]() | |
OpenThreads::AtomicPtr | _observerSet |
OpenThreads::Atomic | _refCount |
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.
Definition at line 57 of file Technique.h.
osgFX::Technique::Technique | ( | ) |
|
inlineprotected |
Definition at line 99 of file Technique.h.
|
inlineprotectedvirtual |
Definition at line 100 of file Technique.h.
|
protected |
create a new pass node, add it to the technique and associate a StateSet
|
protectedpure virtual |
define the rendering passes that make up this technique. You must implement this method in derived classes to add the required passes.
|
inlineprotected |
force rebuilding of pass nodes on next traversal
Definition at line 146 of file Technique.h.
|
inline |
get the number of rendering passes defined in this Technique
Definition at line 131 of file Technique.h.
|
inlineprotectedvirtual |
optional: return a node that overrides the child node on a specified pass
Definition at line 110 of file Technique.h.
|
inline |
get the StateSet object associated to the i-th pass
Definition at line 136 of file Technique.h.
|
inline |
get the const StateSet object associated to the i-th pass
Definition at line 141 of file Technique.h.
|
inlinevirtual |
collect the GL extension strings which are required for this technique to work properly. This method is called from the default implementation of validate().
Definition at line 72 of file Technique.h.
Definition at line 101 of file Technique.h.
|
inlinevirtual |
get a brief description of this Technique
Definition at line 65 of file Technique.h.
|
inlinevirtual |
get the name of this Technique
Definition at line 62 of file Technique.h.
|
inlinevirtual |
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
Definition at line 151 of file Technique.h.
|
protected |
traverse children with multipass if necessary. Don't call this method directly unless you are in a customized version of traverse().
|
virtual |
tests whether this technique is valid for the current rendering context. The default behavior is to call getRequiredExtensions() and check for extension availability.