Closeable.Set, Closeable.Util| Modifier and Type | Field and Description |
|---|---|
int |
id
The GL id of this shader program.
|
| Constructor and Description |
|---|
GLProgram(GL20 gl,
java.lang.String vertexSource,
java.lang.String fragmentSource)
Compiles and links the shader program described by
vertexSource and
fragmentSource. |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Binds this shader program, in preparation for rendering.
|
void |
close()
Frees this program and associated compiled shaders.
|
int |
getAttribLocation(java.lang.String name)
Returns the attribute location with the specified
name. |
int |
getUniformLocation(java.lang.String name)
Returns the uniform location with the specified
name. |
public GLProgram(GL20 gl, java.lang.String vertexSource, java.lang.String fragmentSource)
vertexSource and
fragmentSource.java.lang.RuntimeException - if the program fails to compile or link.public int getUniformLocation(java.lang.String name)
name.public int getAttribLocation(java.lang.String name)
name.public void activate()
Copyright © 2018. All Rights Reserved.