| |
|
| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.NodeComponent javax.media.j3d.ShaderProgram
All known Subclasses: javax.media.j3d.GLSLShaderProgram, javax.media.j3d.CgShaderProgram,
ShaderProgram | abstract public class ShaderProgram extends NodeComponent (Code) | | The ShaderProgram node component object is the abstract base class
for programmable shader programs. Each concrete instance of a
ShaderProgram is a container for a set of Shader objects. The set
of Shaders contained in the ShaderProgram is a complete program for
the Graphics Pipeline Unit (GPU) of the graphics accelerator. It is
specified using the shader language defined by the
ShaderProgram. The currently defined shader languages are: Cg and
GLSL.
NOTE: Applications should not extend this class.
See Also: Shader See Also: ShaderAppearance.setShaderProgram since: Java 3D 1.4 |
Field Summary | |
final public static int | ALLOW_NAMES_READ Specifies that this ShaderProgram object allows reading
its shader or vertex attribute names. | final public static int | ALLOW_SHADERS_READ Specifies that this ShaderProgram object allows reading
its shaders. |
Constructor Summary | |
| ShaderProgram() Package scope constructor so it can't be subclassed by classes
outside the javax.media.j3d package. |
ALLOW_NAMES_READ | final public static int ALLOW_NAMES_READ(Code) | | Specifies that this ShaderProgram object allows reading
its shader or vertex attribute names.
|
ALLOW_SHADERS_READ | final public static int ALLOW_SHADERS_READ(Code) | | Specifies that this ShaderProgram object allows reading
its shaders.
|
ShaderProgram | ShaderProgram()(Code) | | Package scope constructor so it can't be subclassed by classes
outside the javax.media.j3d package.
|
getShaderAttrNames | abstract public String[] getShaderAttrNames()(Code) | | Retrieves the shader attribute names array from this
ShaderProgram object.
exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph a copy of this ShaderProgram's array of shader attribute names. |
getShaders | abstract public Shader[] getShaders()(Code) | | Retrieves the array of shaders from this shader program. A
shallow copy of the array is returned. The return value may
be null.
a copy of this ShaderProgram's array of Shader objects exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
getVertexAttrNames | abstract public String[] getVertexAttrNames()(Code) | | Retrieves the vertex attribute names array from this
ShaderProgram object.
exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph a copy of this ShaderProgram's array of vertex attribute names. |
setShaderAttrNames | abstract public void setShaderAttrNames(String[] shaderAttrNames)(Code) | | Sets the shader attribute names array for this ShaderProgram
object. Each element in the array specifies a shader
attribute name that may be set via a ShaderAttribute object.
Only those attributes whose names that appear in the shader
attribute names array can be set for a given shader program.
The array of names may be null or empty (0 length), but the
elements of the array must be non-null.
TODO: finish this.
Parameters: shaderAttrNames - array of shader attribute names for thisshader program. A copy of this array is made. exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. exception: NullPointerException - if any element in theshaderAttrNames array is null. |
setShaders | abstract public void setShaders(Shader[] shaders)(Code) | | Copies the specified array of shaders into this shader
program. This method makes a shallow copy of the array. The
array of shaders may be null or empty (0 length), but the
elements of the array must be non-null. The shading
language of each shader in the array must match the
subclass. Subclasses may impose additional restrictions.
Parameters: shaders - array of Shader objects to be copied into thisShaderProgram exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. exception: IllegalArgumentException - if the shading language ofany shader in the shaders array doesn't match the type of thesubclass. exception: NullPointerException - if any element in theshaders array is null. |
setVertexAttrNames | abstract public void setVertexAttrNames(String[] vertexAttrNames)(Code) | | Sets the vertex attribute names array for this ShaderProgram
object. Each element in the array specifies the shader
attribute name that is bound to the corresponding numbered
vertex attribute within a GeometryArray object that uses this
shader program. Array element 0 specifies the name of
GeometryArray vertex attribute 0, array element 1 specifies the
name of GeometryArray vertex attribute 1, and so forth.
The array of names may be null or empty (0 length), but the
elements of the array must be non-null.
Parameters: vertexAttrNames - array of vertex attribute names for thisshader program. A copy of this array is made. exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. exception: NullPointerException - if any element in thevertexAttrNames array is null. |
Fields inherited from javax.media.j3d.NodeComponent | boolean forceDuplicate(Code)(Java Doc)
|
|
|
|