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

The ComposedShader node defines a shader where the individual source files are not individually programmable. More...

#include <ComposedShader.h>

Inheritance diagram for H3D::ComposedShader:

Inheritance graph
List of all members.

Public Types

typedef DependentMFNode< ShaderPart,
FieldRef< X3DUrlObject, MFString,
&ShaderPart::url >, true > 
MFShaderPart
 The MFShaderPart is dependent on the url field of the containing ShaderPart node.

Public Member Functions

 ComposedShader (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< MFShaderPart > _parts=0)
 Constructor.
virtual bool addField (const string &name, const Field::AccessType &access, Field *field)
 The addField method is specialized to add a route from the field added to the displayList field.
virtual void render ()
 Sets up the shader program and sets uniform variable values.
virtual void preRender ()
 Enables the shader program.
virtual void postRender ()
 Disables the shader program.

Public Attributes

auto_ptr< MFShaderPartparts
 The shader parts to use in the ComposedShader.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Attributes

GLhandleARB program_handle
 The handle to the program object used for the shader in OpenGL.
vector< GLhandleARB > current_shaders
 A vector of the handles to all shader objects that are currently linked into the program object.

Static Protected Attributes

static bool shader_support_checked = false

Detailed Description

The ComposedShader node defines a shader where the individual source files are not individually programmable.

All access to the shading capabilities is defined through a single interface that applies to all parts.

In H3D API this is the shader node to use if you want to use the GLSL shading language. If you want to use CG, use either the ProgramShader or PackagedShader nodes.

The isValid field adds an additional semantic indicating whether the current shader parts can be linked together to form a complete valid shader program.

The activate field forces the shader to activate the contained objects.

Internal routes:
ComposedShader.dot


Member Data Documentation

auto_ptr< MFShaderPart > H3D::ComposedShader::parts
 

The shader parts to use in the ComposedShader.

Access type: outputOnly

ComposedShader_parts.dot


Generated on Thu Aug 24 12:38:55 2006 for H3D API by  doxygen 1.4.5