|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.opengl.util.glsl.ShaderProgram
public class ShaderProgram
Field Summary | |
---|---|
protected Integer |
id
|
protected static int |
nextID
|
protected boolean |
programInUse
|
protected boolean |
programLinked
|
protected HashMap |
shaderMap
|
protected int |
shaderProgram
|
Constructor Summary | |
---|---|
ShaderProgram()
|
Method Summary | |
---|---|
boolean |
add(ShaderCode shaderCode)
Adds a new shader to a this non running program. |
void |
destroy(GL2ES2 gl)
Detaches all shader codes and deletes the program. |
boolean |
equals(Object obj)
|
ShaderCode |
getShader(int id)
|
boolean |
glReplaceShader(GL2ES2 gl,
int oldShaderID,
ShaderCode newShader,
PrintStream verboseOut)
Replace a shader in a 'running' program. |
protected void |
glUseProgram(GL2ES2 gl,
boolean on)
|
int |
hashCode()
|
int |
id()
returns the uniq shader id as an integer |
boolean |
inUse()
|
Integer |
key()
returns the uniq shader id as an Integer |
boolean |
link(GL2ES2 gl,
PrintStream verboseOut)
|
boolean |
linked()
|
int |
program()
|
void |
release(GL2ES2 gl)
Detaches all shader codes and deletes the program. |
void |
release(GL2ES2 gl,
boolean releaseShaderToo)
Detaches all shader codes and deletes the program. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean programLinked
protected boolean programInUse
protected int shaderProgram
protected HashMap shaderMap
protected Integer id
protected static int nextID
Constructor Detail |
---|
public ShaderProgram()
Method Detail |
---|
public boolean linked()
public boolean inUse()
public int program()
public int id()
key()
public Integer key()
id()
public void destroy(GL2ES2 gl)
release(GL2ES2, boolean)
public void release(GL2ES2 gl)
release(GL2ES2, boolean)
public void release(GL2ES2 gl, boolean releaseShaderToo)
public boolean add(ShaderCode shaderCode)
public ShaderCode getShader(int id)
public boolean glReplaceShader(GL2ES2 gl, int oldShaderID, ShaderCode newShader, PrintStream verboseOut)
gl
- oldShaderID
- the to be replace ShadernewShader
- the new ShaderCodeverboseOut
- the optional verbose outputstream
GLException
- is the program is not linkedgetAttribLocation
,
#glRefetchAttribLocations
,
#glResetAllVertexAttributes
,
glReplaceShader(javax.media.opengl.GL2ES2, int, com.sun.opengl.util.glsl.ShaderCode, java.io.PrintStream)
public boolean link(GL2ES2 gl, PrintStream verboseOut)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
protected void glUseProgram(GL2ES2 gl, boolean on)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |