SoShaderProgram.3coin2

Langue: en

Version: 376817 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

SoShaderProgram -

The SoShaderProgram class is used to specify a set of vertex/geometry/fragment objects.

SYNOPSIS


#include <Inventor/nodes/SoShaderProgram.h>

Inherits SoNode.

Public Member Functions


SoShaderProgram (void)

void setEnableCallback (SoShaderProgramEnableCB *cb, void *closure)

virtual void GLRender (SoGLRenderAction *action)

virtual void search (SoSearchAction *action)

Static Public Member Functions


static void initClass ()

Public Attributes


SoMFNode shaderObject

Protected Member Functions


virtual ~SoShaderProgram ()

Detailed Description

The SoShaderProgram class is used to specify a set of vertex/geometry/fragment objects.

This node can store one of each of SoVertexShader, SoGeometryShader and SoFragmentShader in its shaderObject field. Coin will load all shader objects specified there, and attach all objects into a program before binding it as the current shader program.

See Shaders in Coin for more information on how to set up a scene graph with shaders.

FILE FORMAT/DEFAULTS:

     ShaderProgram {
       shaderObject []
     }
 
 

See also:

SoShaderObject
SoShaderProgram

Since:

Coin 2.5

Constructor & Destructor Documentation

SoShaderProgram::SoShaderProgram (void)Constructor.

References SoField::setDefault(), SoMField::setNum(), and shaderObject.

SoShaderProgram::~SoShaderProgram () [protected, virtual]Destructor.

Member Function Documentation

void SoShaderProgram::setEnableCallback (SoShaderProgramEnableCB * cb, void * closure)Adds a callback which is called every time this program is enabled/disabled.

void SoShaderProgram::GLRender (SoGLRenderAction * action) [virtual]Action method for the SoGLRenderAction.

This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method.

Reimplemented from SoNode.

void SoShaderProgram::search (SoSearchAction * action) [virtual]Action method for SoSearchAction.

Compares the search criteria from the action to see if this node is a match. Searching is done by matching up all criteria set up in the SoSearchAction -- if any of the requested criteria is a miss, the search is not deemed successful for the node.

See also:

SoSearchAction

Reimplemented from SoNode.

References SoMField::getNum(), SoAction::getPathCode(), SoSearchAction::isFound(), SoAction::popCurPath(), SoAction::pushCurPath(), SoNode::search(), and shaderObject.

void SoShaderProgram::initClass (void) [static]Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoNode.

Member Data Documentation

SoMFNode SoShaderProgram::shaderObjectThe shader objects.

Referenced by search(), and SoShaderProgram().

Author

Generated automatically by Doxygen for Coin from the source code.