|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.effect.glslshader.GPUProgram
public class GPUProgram
This class can be used to read in and bind vertex and fragment shaders.
| Constructor Summary | |
|---|---|
GPUProgram(java.lang.String vertexProgramFile,
java.lang.String fragmentProgramFile)
Creates a new GPU program. |
|
| Method Summary | |
|---|---|
void |
bind(javax.media.opengl.GL gl)
Binds the shader to the successive draw operations. |
boolean |
init()
Initializes the shader. |
void |
passUniform1f(javax.media.opengl.GL gl,
java.lang.String name,
float f)
Passes a float value to the shader program. |
void |
passUniform1i(javax.media.opengl.GL gl,
java.lang.String name,
int i)
Passes a integer value to the shader program. |
void |
passUniform3f(javax.media.opengl.GL gl,
java.lang.String name,
float f0,
float f1,
float f2)
Passes three float values to the shader program. |
void |
passUniform4f(javax.media.opengl.GL gl,
java.lang.String name,
float f0,
float f1,
float f2,
float f3)
Passes four float values to the shader program. |
void |
release(javax.media.opengl.GL gl)
Releases the shader. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPUProgram(java.lang.String vertexProgramFile,
java.lang.String fragmentProgramFile)
vertexProgramFile - vertex program filefragmentProgramFile - fragment program file| Method Detail |
|---|
public boolean init()
public void bind(javax.media.opengl.GL gl)
gl - public void release(javax.media.opengl.GL gl)
gl -
public void passUniform1i(javax.media.opengl.GL gl,
java.lang.String name,
int i)
name - name of the variable to pass the value toi - value that gets passed to the shader
public void passUniform1f(javax.media.opengl.GL gl,
java.lang.String name,
float f)
name - name of the variable to pass the value tof - value that gets passed to the shader
public void passUniform3f(javax.media.opengl.GL gl,
java.lang.String name,
float f0,
float f1,
float f2)
name - name of the variable to pass the values tof0 - first value that gets passed to the shaderf1 - second value that gets passed to the shaderf2 - third value that gets passed to the shader
public void passUniform4f(javax.media.opengl.GL gl,
java.lang.String name,
float f0,
float f1,
float f2,
float f3)
name - name of the variable to pass the values tof0 - first value that gets passed to the shaderf1 - second value that gets passed to the shaderf2 - third value that gets passed to the shaderf3 - fourth value that gets passed to the shader
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||