|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodeanticode.glgraphics.GLSLShader
public class GLSLShader
This class encapsulates a glsl shader. Based in the code by JohnG (http://www.hardcorepawn.com/)
Constructor Summary | |
---|---|
GLSLShader(processing.core.PApplet parent)
Creates an instance of GLSLShader. |
Method Summary | |
---|---|
int |
getAttribLocation(java.lang.String name)
Returns the ID location of the attribute parameter given its name. |
int |
getUniformLocation(java.lang.String name)
Returns the ID location of the uniform parameter given its name. |
void |
linkProgram()
Links the shader program and validates it. |
void |
loadFragmentShader(java.lang.String file)
Loads and compiles the fragment shader contained in file. |
void |
loadGeometryShader(java.lang.String file)
Loads and compiles the geometry shader contained in file. |
void |
loadVertexShader(java.lang.String file)
Loads and compiles the vertex shader contained in file. |
void |
setupGeometryShader(java.lang.String inGeoPrim,
java.lang.String outGeoPrim,
int maxNumOutVert)
Configures the geometry shader by setting the primitive types that it will take as input and return as output, and the maximum number of vertices that will generate. |
void |
start()
Starts the execution of the shader program. |
void |
stop()
Stops the execution of the shader program. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GLSLShader(processing.core.PApplet parent)
parent
- PAppletMethod Detail |
---|
public void loadVertexShader(java.lang.String file)
file
- Stringpublic void loadGeometryShader(java.lang.String file)
file
- Stringpublic void loadFragmentShader(java.lang.String file)
file
- Stringpublic int getAttribLocation(java.lang.String name)
name
- String
public int getUniformLocation(java.lang.String name)
name
- String
public void setupGeometryShader(java.lang.String inGeoPrim, java.lang.String outGeoPrim, int maxNumOutVert)
inGeoPrim
- StringoutGeoPrim
- StringmaxNumOutVert
- intpublic void linkProgram()
public void start()
public void stop()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |