H3D::ProgramShader Class Reference
[X3D node classes.]

he ProgramShader node defines a shader that can consist of one or more individually programmable, self contained pieces. More...

#include <H3D/ProgramShader.h>

Inheritance diagram for H3D::ProgramShader:

Inheritance graph

List of all members.

Classes

class  MFShaderProgram
 The MFShaderProgram class sets the profile for each ShaderProgram node that is added to it. More...

Public Member Functions

 ProgramShader (Inst< DisplayList > _displayList=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isSelected=0, Inst< SFBool > _isValid=0, Inst< SFBool > _activate=0, Inst< SFString > _language=0, Inst< MFShaderProgram > _programs=0)
 Constructor.
virtual bool isSupported ()
 Returns true if the shader node type is supported by the browser.
virtual void render ()
 Sets up the shaders program and sets uniform variable values.
virtual void preRender ()
 Enables the shader programs.
virtual void postRender ()
 Disables the shader programs.

Public Attributes

auto_ptr< MFShaderProgramprograms
 The shader programs to use in the ProgramShader.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

he ProgramShader node defines a shader that can consist of one or more individually programmable, self contained pieces.

Each piece, represented by a ShaderProgram node, shall be a self-contained source that does not rely on any other source file and can manage one part of the programmable pipeline (e.g., vertex or fragment processing).

This node can be used with the CG shading language in H3D API. You can also use the PackagedShader node with CG. If you want to use GLSL you will have to use the ComposedShader node.

The programs field consists of zero or more ShaderProgram node instances. In general, only two ShaderProgram instances will be needed: one each for vertex and fragment processing. Each shader language annex shall refine the required behaviour for processing this field.

The isValid field may add an additional semantic to indicate whether all parts are available.

Internal routes:
ProgramShader.dot

Member Data Documentation

The shader programs to use in the ProgramShader.

Access type: outputOnly

ProgramShader_programs.dot

Referenced by postRender(), preRender(), ProgramShader(), and render().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:30:47 2008 for H3D API by  doxygen 1.5.7