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 <H3D/ShaderPart.h>

Inheritance diagram for H3D::ShaderPart:

Inheritance graph

List of all members.

Classes

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

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.


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.

References H3DUtil::RefCountedClass::getName(), shader_handle, shaderString, type, and H3D::X3DUrlObject::url_used.

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

Returns the default xml containerField attribute value.

For this node it is "parts".

Reimplemented from H3D::Node.

GLhandleARB H3D::ShaderPart::getShaderHandle (  )  [inline]

Get the handle to the shader object that currently is used for this ShaderPart.

X3DUrlObject::LoadStatus ShaderPart::loadStatus (  )  [virtual]

The loadStatus function returns the status of the loading of the current urls in order to be used with the LoadSensor node.

Reimplemented from H3D::X3DUrlObject.

References H3D::X3DUrlObject::FAILED, H3D::X3DUrlObject::LOADED, and H3D::X3DUrlObject::url_used.


Member Data Documentation

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

ShaderPart_shaderString.dot

Referenced by compileShader(), and ShaderPart().

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

Referenced by compileShader(), and ShaderPart().


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

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