|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.ShaderObject
public class ShaderObject
Representation of a single Shader Object code that will form the final shader program.
| Field Summary |
|---|
| Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
| Constructor Summary | |
|---|---|
ShaderObject(boolean isVertexShader)
Constructs a Shader Object of the specific kind. |
|
| Method Summary | |
|---|---|
void |
clearSourceStrings()
Clear the source string so that it is no longer needed. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
int |
compareTo(ShaderObject so)
Compares this object with the specified object for order. |
void |
compile()
Mark this code as needing compilation at the next available oppourtunity. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
boolean |
equals(ShaderObject so)
Compares this object with the specified object to check for equivalence. |
void |
fetchLogInfo(javax.media.opengl.GL gl)
The user requested log information about the shader object, so now is the time to fetch it. |
java.lang.String |
getLastInfoLog()
Get the last fetched information log from this shader. |
protected int |
getShaderId(javax.media.opengl.GL gl)
Request the object_id for this shader object so that it can be linked with the containing program. |
java.lang.String[] |
getSourceStrings()
Get the currently set source strings. |
void |
initialize(javax.media.opengl.GL gl)
Internal method to have the containing ShaderProgram request a compile of this object, if available. |
boolean |
isCompilationConfirmed(boolean enable)
Check to see the current state of whether compilation should be confirmed. |
boolean |
isCompiled()
Deprecated. Should not be called any more by client code. |
protected boolean |
isCompiled(javax.media.opengl.GL gl)
Query the current compilation state for this code under the given GL context. |
boolean |
isVertexShader()
Query to find out whether this is a fragment or vertex shader object encapsulation. |
void |
markForDeletion()
Not implemented yet. |
void |
requestCompilationConfirmation(boolean enable)
Have the class confirm whether or not the source successfully compiled. |
void |
requestInfoLog()
Request that the shader fetch the last run log of this program. |
void |
setSourceStrings(java.lang.String[] str,
int numValid)
Set the program string that is to be registered by this shader. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
| Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShaderObject(boolean isVertexShader)
| Method Detail |
|---|
protected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler in class SceneGraphObjecthandler - The instance to use as a handlerpublic void initialize(javax.media.opengl.GL gl)
initialize in interface ShaderSourceRenderablegl - The gl context to draw withpublic void fetchLogInfo(javax.media.opengl.GL gl)
fetchLogInfo in interface ShaderSourceRenderablegl - The gl context to draw with
public int compareTo(java.lang.Object o)
throws java.lang.ClassCastException
compareTo in interface java.lang.Comparableo - The objec to be compared
java.lang.ClassCastException - The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
equals in interface Renderableequals in class java.lang.Objecto - The object to be compared
public boolean isVertexShader()
public void setSourceStrings(java.lang.String[] str,
int numValid)
throws InvalidWriteTimingException
Setting a new set of source strings does not automatically imply that
the code should be recompiled at the next available oppourtunity. To
force a recompilation (and thus any downstream effects like linking)
you will also need to call the compile() method
as well, after calling this one.
str - The new program string(s) to be registered or nullnumValid - The number of valid strings to use from the array
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic java.lang.String[] getSourceStrings()
public void clearSourceStrings()
InvalidWriteTimingException - An attempt was made to clear outside
of the NodeUpdateListener data changed callback methodpublic void compile()
public void requestInfoLog()
throws InvalidWriteTimingException
InvalidWriteTimingException - An attempt was made to request this
outside of the updateSceneGraph() callpublic java.lang.String getLastInfoLog()
public boolean isCompiled()
protected boolean isCompiled(javax.media.opengl.GL gl)
gl - The GL context to check compilation on
public void markForDeletion()
public void requestCompilationConfirmation(boolean enable)
enable - true if the code should confirm compilation succeedspublic boolean isCompilationConfirmed(boolean enable)
protected int getShaderId(javax.media.opengl.GL gl)
gl - The GL context to used for the caller
public int compareTo(ShaderObject so)
so - The object instance to be compared
public boolean equals(ShaderObject so)
so - The object instance to be compared
|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||