|
|||||||||
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.Shader
javax.media.j3d.SourceCodeShader
public class SourceCodeShader
The SourceCodeShader object is a shader that is defined using text-based source code. It is used to define the source code for both vertex and fragment shaders. The currently supported shading languages are Cg and GLSL.
ShaderProgram
Field Summary |
---|
Fields inherited from class javax.media.j3d.Shader |
---|
SHADER_TYPE_FRAGMENT, SHADER_TYPE_VERTEX, SHADING_LANGUAGE_CG, SHADING_LANGUAGE_GLSL |
Fields inherited from class javax.media.j3d.NodeComponent |
---|
forceDuplicate |
Fields inherited from class javax.media.j3d.SceneGraphObject |
---|
nodeHashtable, retained |
Constructor Summary | |
---|---|
SourceCodeShader()
Not a public constructor, for internal use |
|
SourceCodeShader(int shadingLanguage,
int shaderType,
java.lang.String shaderSource)
Constructs a new shader object of the specified shading language and shader type from the specified source string. |
Method Summary | |
---|---|
NodeComponent |
cloneNodeComponent()
Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate) |
(package private) void |
createRetained()
Creates a retained mode SourceCodeShaderRetained object that this SourceCodeShader component object will point to. |
(package private) void |
duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate)
Copies all node information from originalNodeComponent
into the current node. |
java.lang.String |
getShaderSource()
Retrieves the shader source string from this shader object. |
Methods inherited from class javax.media.j3d.Shader |
---|
getShaderType, getShadingLanguage |
Methods inherited from class javax.media.j3d.NodeComponent |
---|
checkDuplicateNodeComponent, cloneNodeComponent, duplicateChild, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree, validateImageIllegalSharing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
SourceCodeShader()
public SourceCodeShader(int shadingLanguage, int shaderType, java.lang.String shaderSource)
shadingLanguage
- the specified shading language, one of:
SHADING_LANGUAGE_GLSL
or
SHADING_LANGUAGE_CG
.shaderType
- the shader type, one of:
SHADER_TYPE_VERTEX
or
SHADER_TYPE_FRAGMENT
.shaderSource
- the shader source code
java.lang.NullPointerException
- if shaderSource is null.Method Detail |
---|
public java.lang.String getShaderSource()
void createRetained()
createRetained
in class NodeComponent
public NodeComponent cloneNodeComponent()
cloneNodeComponent
in class NodeComponent
void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
originalNodeComponent
into the current node. This method is called from the
duplicateNode
method. This routine does
the actual duplication of all "local data" (any data defined in
this object).
duplicateAttributes
in class NodeComponent
originalNodeComponent
- the original node to duplicateforceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.Node.cloneTree()
,
NodeComponent.setDuplicateOnCloneTree(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |