|
||||||||
| 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/)
| Field Summary | |
|---|---|
protected int |
fragmentShader
|
protected GL |
gl
|
protected processing.core.PApplet |
parent
|
protected PGraphicsOpenGL |
pgl
|
protected int |
programObject
|
protected int |
vertexShader
|
| Constructor Summary | |
|---|---|
GLSLShader(processing.core.PApplet parent)
Creates an instance of GLSLShader. |
|
| Method Summary | |
|---|---|
protected void |
checkLogInfo(java.lang.String title,
int obj)
|
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 |
loadVertexShader(java.lang.String file)
Loads and compiles the vertex shader contained in file. |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected processing.core.PApplet parent
protected GL gl
protected PGraphicsOpenGL pgl
protected int programObject
protected int vertexShader
protected int fragmentShader
| Constructor Detail |
|---|
public GLSLShader(processing.core.PApplet parent)
parent - PApplet| Method Detail |
|---|
public void loadVertexShader(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 linkProgram()
public void start()
public void stop()
protected void checkLogInfo(java.lang.String title,
int obj)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||