| java.lang.Object javax.media.j3d.IndexedObject javax.media.j3d.SceneGraphObjectRetained javax.media.j3d.NodeComponentRetained javax.media.j3d.ShaderProgramRetained
All known Subclasses: javax.media.j3d.CgShaderProgramRetained, javax.media.j3d.GLSLShaderProgramRetained,
ShaderProgramRetained | abstract class ShaderProgramRetained extends NodeComponentRetained (Code) | | The ShaderProgramRetained object is a component object of an AppearanceRetained
object that defines the shader properties used when programmable shader is
enabled. ShaderProgramRetained object is an abstract class. All shader program
objects must be created as either a GLSLShaderProgramRetained object or a
CgShaderProgramRetained object.
|
Inner Class :class ShaderProgramData extends Object | |
Inner Class :class AttrNameInfo | |
Method Summary | |
abstract ShaderError | bindVertexAttrName(Context ctx, ShaderProgramId shaderProgramId, String attrName, int attrIndex) Method to bind a vertex attribute name to the specified index. | void | clearLive(int refCount) | abstract ShaderError | compileShader(Context ctx, ShaderId shaderId, String source) Method to compile the native shader. | abstract ShaderError | createShader(Context ctx, ShaderRetained shader, ShaderId[] shaderIdArr) Method to create the native shader. | abstract ShaderError | createShaderProgram(Context ctx, ShaderProgramId[] shaderProgramIdArr) Method to create the native shader program. | abstract ShaderError | destroyShader(Context ctx, ShaderId shaderId) Method to destroy the native shader. | void | destroyShader(Canvas3D cv, int cvRdrIndex, ShaderRetained shader) Method to destroy the native shader. | abstract ShaderError | destroyShaderProgram(Context ctx, ShaderProgramId shaderProgramId) Method to destroy the native shader program. | void | destroyShaderProgram(Canvas3D cv, int cvRdrIndex) Method to destroy the native shader program. | abstract ShaderError | disableShaderProgram(Context ctx) Method to disable the native shader program. | abstract ShaderError | enableShaderProgram(Context ctx, ShaderProgramId shaderProgramId) Method to use the native shader program. | String[] | getShaderAttrNames() Retrieves the shader attribute names array from this
ShaderProgram object. | Shader[] | getShaders() Retrieves the array of shaders from this shader program. | String[] | getVertexAttrNames() Retrieves the vertex attribute names array from this
ShaderProgram object. | synchronized void | initMirrorObject() Initializes a mirror object. | abstract boolean | isSupported(Canvas3D cv) Method to return a flag indicating whether this
ShaderProgram is supported on the specified Canvas. | abstract ShaderError | linkShaderProgram(Context ctx, ShaderProgramId shaderProgramId, ShaderId[] shaderIds) Method to link the native shader program. | abstract void | lookupShaderAttrNames(Context ctx, ShaderProgramId shaderProgramId, String[] attrNames, AttrNameInfo[] attrNameInfoArr) Method to lookup a list of (uniform) shader attribute names and return
information about the attributes. | abstract void | lookupVertexAttrNames(Context ctx, ShaderProgramId shaderProgramId, String[] attrNames, boolean[] errArr) | void | notifyErrorListeners(Canvas3D cv, ShaderError err) Send a message to the notification thread, which will call the
shader error listeners. | void | setLive(boolean backgroundGroup, int refCount) | void | setShaderAttrNames(String[] shaderAttrNames) Sets the shader attribute names array for this ShaderProgram
object. | void | setShaderAttributes(Canvas3D cv, ShaderAttributeSetRetained attributeSet) | void | setShaders(Shader[] shaders) Copies the specified array of shaders into this shader
program. | abstract ShaderError | setUniform1f(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, float value) | abstract ShaderError | setUniform1fArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, float[] value) | abstract ShaderError | setUniform1i(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int value) | abstract ShaderError | setUniform1iArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, int[] value) | abstract ShaderError | setUniform2f(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, float[] value) | abstract ShaderError | setUniform2fArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, float[] value) | abstract ShaderError | setUniform2i(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int[] value) | abstract ShaderError | setUniform2iArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, int[] value) | abstract ShaderError | setUniform3f(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, float[] value) | abstract ShaderError | setUniform3fArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, float[] value) | abstract ShaderError | setUniform3i(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int[] value) | abstract ShaderError | setUniform3iArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, int[] value) | abstract ShaderError | setUniform4f(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, float[] value) | abstract ShaderError | setUniform4fArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, float[] value) | abstract ShaderError | setUniform4i(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int[] value) | abstract ShaderError | setUniform4iArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, int[] value) | ShaderError | setUniformAttrArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc loc, ShaderAttributeArrayRetained saa) | ShaderError | setUniformAttrValue(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc loc, ShaderAttributeValueRetained sav) | abstract ShaderError | setUniformMatrix3f(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, float[] value) | abstract ShaderError | setUniformMatrix3fArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, float[] value) | abstract ShaderError | setUniformMatrix4f(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, float[] value) | abstract ShaderError | setUniformMatrix4fArray(Context ctx, ShaderProgramId shaderProgramId, ShaderAttrLoc uniformLocation, int numElements, float[] value) | void | setVertexAttrNames(String[] vertexAttrNames) Sets the vertex attribute names array for this ShaderProgram
object. | synchronized void | updateMirrorObject(int component, Object value) | void | updateNative(Canvas3D cv, boolean enable) |
shaderProgramData | protected ShaderProgramData shaderProgramData(Code) | | |
ShaderProgramRetained | ShaderProgramRetained()(Code) | | |
clearLive | void clearLive(int refCount)(Code) | | |
destroyShaderProgram | void destroyShaderProgram(Canvas3D cv, int cvRdrIndex)(Code) | | Method to destroy the native shader program.
|
disableShaderProgram | abstract ShaderError disableShaderProgram(Context ctx)(Code) | | Method to disable the native shader program.
|
getShaderAttrNames | String[] getShaderAttrNames()(Code) | | Retrieves the shader attribute names array from this
ShaderProgram object.
a copy of this ShaderProgram's array of shader attribute names. |
getShaders | 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 |
getVertexAttrNames | String[] getVertexAttrNames()(Code) | | Retrieves the vertex attribute names array from this
ShaderProgram object.
a copy of this ShaderProgram's array of vertex attribute names. |
initMirrorObject | synchronized void initMirrorObject()(Code) | | Initializes a mirror object.
|
isSupported | abstract boolean isSupported(Canvas3D cv)(Code) | | Method to return a flag indicating whether this
ShaderProgram is supported on the specified Canvas.
|
lookupShaderAttrNames | abstract void lookupShaderAttrNames(Context ctx, ShaderProgramId shaderProgramId, String[] attrNames, AttrNameInfo[] attrNameInfoArr)(Code) | | Method to lookup a list of (uniform) shader attribute names and return
information about the attributes.
|
notifyErrorListeners | void notifyErrorListeners(Canvas3D cv, ShaderError err)(Code) | | Send a message to the notification thread, which will call the
shader error listeners.
|
setLive | void setLive(boolean backgroundGroup, int refCount)(Code) | | |
setShaderAttrNames | 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.
Parameters: shaderAttrNames - array of shader attribute names for thisshader program. A copy of this array is made. |
setShaders | 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: CapabilityNotSetException - if appropriate capability isnot set and 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. |
setVertexAttrNames | 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. |
updateMirrorObject | synchronized void updateMirrorObject(int component, Object value)(Code) | | Update the "component" field of the mirror object with the given "value"
|
updateNative | void updateNative(Canvas3D cv, boolean enable)(Code) | | updateNative is called while traversing the RenderBin to
update the shader program state
|
Fields inherited from javax.media.j3d.IndexedObject | int[][] listIdx(Code)(Java Doc)
|
|
|