|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.joglutils.msg.nodes.Node
net.java.joglutils.msg.nodes.ShaderNode
public class ShaderNode
Represents a vertex/fragment shader.
| Constructor Summary | |
|---|---|
ShaderNode()
|
|
| Method Summary | |
|---|---|
void |
doAction(Action action)
Performs the "typical" operation for this node when an action is applied to it. |
Shader |
getShader()
Fetches the Shader object associated with this ShaderNode. |
void |
setShader(String fragmentShaderCode)
Initializes this shader from the given String. |
void |
setShader(String vertexShaderCode,
String fragmentShaderCode)
Initializes this shader from the given String. |
void |
setUniform(String name,
float f0)
Sets the uniform variable of the given name with the provided float value. |
void |
setUniform(String name,
float f0,
float f1)
Sets the uniform variable of the given name with the provided float values. |
void |
setUniform(String name,
float f0,
float f1,
float f2)
Sets the uniform variable of the given name with the provided float values. |
void |
setUniform(String name,
float f0,
float f1,
float f2,
float f3)
Sets the uniform variable of the given name with the provided float values. |
void |
setUniform(String name,
int i0)
Sets the uniform variable of the given name with the provided integer value. |
void |
setUniform(String name,
int i0,
int i1)
Sets the uniform variable of the given name with the provided integer values. |
void |
setUniform(String name,
int i0,
int i1,
int i2)
Sets the uniform variable of the given name with the provided integer values. |
void |
setUniform(String name,
int i0,
int i1,
int i2,
int i3)
Sets the uniform variable of the given name with the provided integer values. |
void |
setUniformArray1f(String name,
int count,
float[] vals,
int off)
Sets the uniform array variable of the given name with the provided float array values. |
void |
setUniformArray1i(String name,
int count,
int[] vals,
int off)
Sets the uniform array variable of the given name with the provided int array values. |
void |
setUniformArray2f(String name,
int count,
float[] vals,
int off)
Sets the uniform array variable of the given name with the provided float array values. |
void |
setUniformArray2i(String name,
int count,
int[] vals,
int off)
Sets the uniform array variable of the given name with the provided int array values. |
void |
setUniformArray3f(String name,
int count,
float[] vals,
int off)
Sets the uniform array variable of the given name with the provided float array values. |
void |
setUniformArray3i(String name,
int count,
int[] vals,
int off)
Sets the uniform array variable of the given name with the provided int array values. |
void |
setUniformArray4f(String name,
int count,
float[] vals,
int off)
Sets the uniform array variable of the given name with the provided float array values. |
void |
setUniformArray4i(String name,
int count,
int[] vals,
int off)
Sets the uniform array variable of the given name with the provided int array values. |
void |
setUniformMatrices2f(String name,
int count,
boolean transpose,
float[] vals,
int off)
Sets the uniform matrix (or matrix array) variable of the given name with the provided matrix values. |
void |
setUniformMatrices3f(String name,
int count,
boolean transpose,
float[] vals,
int off)
Sets the uniform matrix (or matrix array) variable of the given name with the provided matrix values. |
void |
setUniformMatrices4f(String name,
int count,
boolean transpose,
float[] vals,
int off)
Sets the uniform matrix (or matrix array) variable of the given name with the provided matrix values. |
| Methods inherited from class net.java.joglutils.msg.nodes.Node |
|---|
rayPick, render |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShaderNode()
| Method Detail |
|---|
public void setShader(String fragmentShaderCode)
public void setShader(String vertexShaderCode,
String fragmentShaderCode)
public void setUniform(String name,
int i0)
name - the name of the uniform variable to be seti0 - the first uniform parameter
public void setUniform(String name,
int i0,
int i1)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be seti0 - the first uniform parameteri1 - the second uniform parameter
public void setUniform(String name,
int i0,
int i1,
int i2)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be seti0 - the first uniform parameteri1 - the second uniform parameteri2 - the third uniform parameter
public void setUniform(String name,
int i0,
int i1,
int i2,
int i3)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be seti0 - the first uniform parameteri1 - the second uniform parameteri2 - the third uniform parameteri3 - the fourth uniform parameter
public void setUniform(String name,
float f0)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setf0 - the first uniform parameter
public void setUniform(String name,
float f0,
float f1)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setf0 - the first uniform parameterf1 - the second uniform parameter
public void setUniform(String name,
float f0,
float f1,
float f2)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setf0 - the first uniform parameterf1 - the second uniform parameterf2 - the third uniform parameter
public void setUniform(String name,
float f0,
float f1,
float f2,
float f3)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setf0 - the first uniform parameterf1 - the second uniform parameterf2 - the third uniform parameterf3 - the fourth uniform parameter
public void setUniformArray1i(String name,
int count,
int[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of int elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray2i(String name,
int count,
int[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of ivec2 elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray3i(String name,
int count,
int[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of ivec3 elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray4i(String name,
int count,
int[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of ivec4 elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray1f(String name,
int count,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of float elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray2f(String name,
int count,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of vec2 elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray3f(String name,
int count,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of vec3 elements in the arrayvals - the array values to be setoff - the offset into the vals array
public void setUniformArray4f(String name,
int count,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of vec4 elements in the arrayvals - the array values to be setoff - the offset into the vals array
javax.media.opengl.GLException - if no OpenGL context was current or if any
OpenGL-related errors occurred
public void setUniformMatrices2f(String name,
int count,
boolean transpose,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of 2x2 matrices (mat2 elements) in the arraytranspose - if false, each matrix is assumed to be suppplied in
column major order; otherwise assumed to be supplied in row major ordervals - the matrix values to be setoff - the offset into the vals array
public void setUniformMatrices3f(String name,
int count,
boolean transpose,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of 3x3 matrices (mat3 elements) in the arraytranspose - if false, each matrix is assumed to be suppplied in
column major order; otherwise assumed to be supplied in row major ordervals - the matrix values to be setoff - the offset into the vals array
public void setUniformMatrices4f(String name,
int count,
boolean transpose,
float[] vals,
int off)
No OpenGL work is done during this call; it is done lazily when the Shader is fetched.
name - the name of the uniform variable to be setcount - the number of 4x4 matrices (mat4 elements) in the arraytranspose - if false, each matrix is assumed to be suppplied in
column major order; otherwise assumed to be supplied in row major ordervals - the matrix values to be setoff - the offset into the vals array
public Shader getShader()
throws javax.media.opengl.GLException
javax.media.opengl.GLExceptionpublic void doAction(Action action)
Node
doAction in class Node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||