Class ShaderProgram

java.lang.Object
All Implemented Interfaces:
X3DNode, X3DUrlObject, ShaderProgram, X3DProgrammableShaderObject

public class ShaderProgram extends X3DConcreteNode implements ShaderProgram
ShaderProgram can contain field declarations and a CDATA section of plain-text source code.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. X3D node tooltip: (X3D version 3.1 or later) [X3DNode,X3DUrlObject,X3DProgrammableShaderObject] ShaderProgram is contained by ProgramShader and provides the source and interface to a self-contained program that occupies one part of the rendering process: either a vertex or fragment shader. Hint: ShaderProgram contains field declarations and then corresponding IS/connect statements (if any). Hint: insert an XML Character Data (CDATA) block within the Script node to contain source code embedded within an X3D scene, avoiding the need for escape characters. Hint: a contained XML Character Data (CDATA) block for source code protects whitespace, line breaks, and literal characters (such as & for ampersand character, &lt; for less-than-sign character, and &gt; for greater-than-sign character) from unintended escape-character modifications by XML parsers. Warning: strict order is required for contained constructs: first field declarations (if any), then IS/connect statements (if any), and finally CDATA source-code block. Hint: when parent node is LoadSensor, apply containerField='children' (X3Dv4) or containerField='watchList' (X3Dv3). <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges</a> Hint: embedded ecmascript: source can also be contained in the sourceCode pseudo-field without escape characters, equivalent to last entry in the url list, when using other API codebases and file encodings. *


Package hint: This org.web3d.x3d.jsail concrete class is used for implementing a standalone X3D object as a Plain Old Java Object (POJO). If you are writing Java code for use inside an X3D Script node, compile separate code using only the org.web3d.x3d.sai package instead.
See Also: