Interface ShaderProgram

All Superinterfaces:
X3DNode, X3DProgrammableShaderObject, X3DUrlObject
All Known Implementing Classes:

public interface ShaderProgram extends X3DNode, X3DUrlObject, X3DProgrammableShaderObject
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. ShaderProgram 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, < for less-than-sign character, and > 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).
  • 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 interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also: