|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.NodeComponent
javax.media.j3d.ShaderProgram
public abstract class ShaderProgram
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.
Shader
,
ShaderAppearance.setShaderProgram(javax.media.j3d.ShaderProgram)
Nested Class Summary | |
---|---|
(package private) static class |
ShaderProgram.DefaultErrorListener
|
Field Summary | |
---|---|
static int |
ALLOW_NAMES_READ
Specifies that this ShaderProgram object allows reading its shader or vertex attribute names. |
static int |
ALLOW_SHADERS_READ
Specifies that this ShaderProgram object allows reading its shaders. |
private static ShaderErrorListener |
defaultErrorListener
|
private static int[] |
readCapabilities
|
Fields inherited from class javax.media.j3d.NodeComponent |
---|
forceDuplicate |
Fields inherited from class javax.media.j3d.SceneGraphObject |
---|
nodeHashtable, retained |
Constructor Summary | |
---|---|
ShaderProgram()
Package scope constructor so it can't be subclassed by classes outside the javax.media.j3d package. |
Method Summary | |
---|---|
(package private) static ShaderErrorListener |
getDefaultErrorListener()
|
abstract java.lang.String[] |
getShaderAttrNames()
Retrieves the shader attribute names array from this ShaderProgram object. |
abstract Shader[] |
getShaders()
Retrieves the array of shaders from this shader program. |
abstract java.lang.String[] |
getVertexAttrNames()
Retrieves the vertex attribute names array from this ShaderProgram object. |
abstract void |
setShaderAttrNames(java.lang.String[] shaderAttrNames)
Sets the shader attribute names array for this ShaderProgram object. |
abstract void |
setShaders(Shader[] shaders)
Copies the specified array of shaders into this shader program. |
abstract void |
setVertexAttrNames(java.lang.String[] vertexAttrNames)
Sets the vertex attribute names array for this ShaderProgram object. |
Methods inherited from class javax.media.j3d.NodeComponent |
---|
checkDuplicateNodeComponent, cloneNodeComponent, cloneNodeComponent, createRetained, duplicateAttributes, duplicateChild, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree, validateImageIllegalSharing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ALLOW_SHADERS_READ
public static final int ALLOW_NAMES_READ
private static final int[] readCapabilities
private static ShaderErrorListener defaultErrorListener
Constructor Detail |
---|
ShaderProgram()
Method Detail |
---|
public abstract void setVertexAttrNames(java.lang.String[] vertexAttrNames)
vertexAttrNames
- array of vertex attribute names for this
shader program. A copy of this array is made.
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.
java.lang.NullPointerException
- if any element in the
vertexAttrNames array is null.public abstract java.lang.String[] getVertexAttrNames()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic abstract void setShaderAttrNames(java.lang.String[] shaderAttrNames)
TODO: finish this.
shaderAttrNames
- array of shader attribute names for this
shader program. A copy of this array is made.
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.
java.lang.NullPointerException
- if any element in the
shaderAttrNames array is null.public abstract java.lang.String[] getShaderAttrNames()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic abstract void setShaders(Shader[] shaders)
shaders
- array of Shader objects to be copied into this
ShaderProgram
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.
java.lang.IllegalArgumentException
- if the shading language of
any shader in the shaders array doesn't match the type of the
subclass.
java.lang.NullPointerException
- if any element in the
shaders array is null.public abstract Shader[] getShaders()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphstatic ShaderErrorListener getDefaultErrorListener()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |