|
Aviatrix3D 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.NodeComponent
org.j3d.aviatrix3d.GL14ShaderProgram
org.j3d.aviatrix3d.VertexShader
Node that handles Vertex shader implementation.
The implementation is relatively simple using just a bind program call followed by the parameter setting. If the application needs greater control than this, such as multi-pass rendering, then derive this class and change the render-loop code to do what is required.
Parameters follow the OpenGL model. There are 96 evironment parameters and 96 local parameters. Both can be set through this class, though this may change in a future design revision, to make environment parameters into a global setting.
Though OpenGL can take the attributes as doubles, this is not supported by this API currently.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.GL14ShaderProgram |
programChanged, programId, programString |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
VertexShader()
Constructs a Vertex shader with default values. |
|
VertexShader(int attrListSize,
int paramListSize)
Create a vertext shader instance with a guaranteed maximum parameter list size. |
Method Summary | |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
int |
compareTo(VertexShader sh)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
boolean |
equals(VertexShader sh)
Compares this object with the specified object to check for equivalence. |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
|
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Set up the rendering state now. |
void |
setEnvironmentParam(int idx,
float[] value)
Set the environment parameter as a float array. |
void |
setLocalParam(int idx,
float[] value)
Set the local parameter as a float array. |
Methods inherited from class org.j3d.aviatrix3d.GL14ShaderProgram |
getProgramString, setProgramString |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VertexShader()
public VertexShader(int attrListSize, int paramListSize) throws InvalidWriteTimingException
paramListSize
- The maximum number of environment and local
parameters that will be used.attrListSize
- The maximum number of vertex attributes that will
be used
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodMethod Detail |
public void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
render
in interface RenderableObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
postRender
in interface RenderableObject
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
Derived classes should extend this one to add the extra comparisons needed.
compareTo
in interface java.lang.Comparable
o
- 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)
o
- The object to be compared
public void setEnvironmentParam(int idx, float[] value) throws InvalidWriteTimingException
idx
- The index of the parameter to setvalue
- A float array 4 in length of the values to use
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void setLocalParam(int idx, float[] value) throws InvalidWriteTimingException
idx
- The index of the parameter to setvalue
- A float array 4 in length of the values to use
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int compareTo(VertexShader sh)
Derived classes should extend this one to add the extra comparisons needed.
sh
- The shader instance to be compared
public boolean equals(VertexShader sh)
sh
- The shader instance to be compared
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |