|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.renderer.ShaderObject
com.threerings.opengl.renderer.Program
public class Program
Contains a shader program.
| Nested Class Summary | |
|---|---|
static class |
Program.FloatUniform
A uniform containing a float. |
static class |
Program.IntegerUniform
A uniform containing an integer. |
static class |
Program.Matrix4fUniform
A uniform containing a 4x4 matrix. |
static class |
Program.Uniform
Contains the location and value of a uniform variable. |
static class |
Program.Vector2fUniform
A uniform containing a two-element vector. |
static class |
Program.Vector3fUniform
A uniform containing a three-element vector. |
static class |
Program.Vector4fUniform
A uniform containing a four-element vector. |
| Constructor Summary | |
|---|---|
Program(Renderer renderer)
Creates a new shader program. |
|
| Method Summary | |
|---|---|
int |
getAttribLocation(String name)
Returns the location of the identified attribute. |
Shader |
getFragmentShader()
Returns a reference to the fragment shader. |
int |
getUniformLocation(String name)
Returns the location of the identified uniform variable. |
Shader |
getVertexShader()
Returns a reference to the vertex shader. |
boolean |
relink()
Relinks the program with its current vertex and fragment shaders. |
void |
setAttribLocation(String name,
int index)
Binds an attribute to the specified location. |
boolean |
setShaders(Shader vertex,
Shader fragment)
Sets the shaders for this program and links it. |
void |
setUniforms(Program.Uniform[] uniforms)
Sets the values of the shader's uniform variables. |
| Methods inherited from class com.threerings.opengl.renderer.ShaderObject |
|---|
delete, getId, getInfoLog |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Program(Renderer renderer)
| Method Detail |
|---|
public boolean relink()
public boolean setShaders(Shader vertex,
Shader fragment)
ShaderObject.getInfoLog() can be used to return more information.
public Shader getVertexShader()
public Shader getFragmentShader()
public int getUniformLocation(String name)
public void setUniforms(Program.Uniform[] uniforms)
public void setAttribLocation(String name,
int index)
public int getAttribLocation(String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||