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

The ShaderPart node defines the source for a single object to be used by a ComposedShader node. More...

#include <ShaderPart.h>

Inheritance diagram for H3D::ShaderPart:

Inheritance graph
List of all members.

Public Member Functions

 ShaderPart (Inst< SFNode > _metadata=0, Inst< MFString > _url=0, Inst< SFString > _type=0, Inst< SFShaderString > _shader_string=0)
 Constructor.
virtual GLhandleARB compileShader ()
 Compile the shader using the shader_string field as text input.
GLhandleARB getShaderHandle ()
 Get the handle to the shader object that currently is used for this ShaderPart.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.
virtual X3DUrlObject::LoadStatus loadStatus ()
 The loadStatus function returns the status of the loading of the current urls in order to be used with the LoadSensor node.

Public Attributes

auto_ptr< SFStringtype
 The type field indicates whether this object shall be compiled as a vertex shader, fragment shader, or other future-defined shader type.
auto_ptr< SFShaderStringshaderString
 Internal field that contains the string loaded from file and to be used as input to the shader.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Attributes

GLhandleARB shader_handle
 The handle to the shader object used for this ShaderPart.

Classes

class  SFShaderString
 Update the string to use as shader depending from the urls given. More...

Detailed Description

The ShaderPart node defines the source for a single object to be used by a ComposedShader node.

The source is not required to be a complete shader for all of the vertex/fragment processing.

The type field indicates whether this object shall be compiled as a vertex shader, fragment shader, or other future-defined shader type.

The shader source is read from the URL specified by the url field. When the url field contains no values ([]), this object instance is ignored. Shader source files shall be plain text encoded as specified for MIME type text/plain and interpreted according to the type field.

Internal routes:
ShaderPart.dot


Member Function Documentation

GLhandleARB ShaderPart::compileShader  )  [virtual]
 

Compile the shader using the shader_string field as text input.

Returns a handle to the compiled shader or 0 if compiling failed.

virtual string H3D::ShaderPart::defaultXMLContainerField  )  [inline, virtual]
 

Returns the default xml containerField attribute value.

For this node it is "parts".

Reimplemented from H3D::Node.


Member Data Documentation

auto_ptr< SFShaderString > H3D::ShaderPart::shaderString
 

Internal field that contains the string loaded from file and to be used as input to the shader.

ShaderPart_shaderString.dot

auto_ptr< SFString > H3D::ShaderPart::type
 

The type field indicates whether this object shall be compiled as a vertex shader, fragment shader, or other future-defined shader type.

Valid values are "VERTEX" and "FRAGMENT".

Access type: initializeOnly
ShaderPart_type.dot


Generated on Thu Aug 24 12:39:57 2006 for H3D API by  doxygen 1.4.5