public class SourceCodeShader extends Shader
ShaderProgramSHADER_TYPE_FRAGMENT, SHADER_TYPE_VERTEX, SHADING_LANGUAGE_CG, SHADING_LANGUAGE_GLSLforceDuplicatenodeHashtable, retained| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getShaderType, getShadingLanguagecheckDuplicateNodeComponent, cloneNodeComponent, duplicateChild, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree, validateImageIllegalSharingcapabilityBitsEmpty, checkForLiveOrCompiled, clearCapability, clearCapabilityIsFrequent, clearLive, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getNamePrefix, getNodeComponent, getUserData, isCompiled, isLive, isLiveOrCompiled, setCapability, setCapabilityIsFrequent, setCompiled, setDefaultReadCapabilities, setLive, setName, setUserData, toString, updateNodeReferencesSourceCodeShader()
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 codejava.lang.NullPointerException - if shaderSource is null.public java.lang.String getShaderSource()
void createRetained()
createRetained in class NodeComponentpublic NodeComponent cloneNodeComponent()
cloneNodeComponent in class NodeComponentvoid 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 NodeComponentoriginalNodeComponent - 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)Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.