public class DistortedProgram
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int[] |
mAttribute
List of Attributes (OpenGL ES 3.0: 'in' variables), in the same order as declared in the shader source.
|
int[] |
mUniform
List of Uniforms, in the same order as declared in the shader source.
|
| Constructor and Description |
|---|
DistortedProgram(java.lang.String vertex,
java.lang.String fragment)
Create a new Shader Program from two source strings.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getProgramHandle()
Return the handle of the created program so that we can later, say, call glUseProgram.
|
void |
useProgram()
Use the program and enable all vertex attribute arrays.
|
public final int[] mAttribute
public final int[] mUniform
public DistortedProgram(java.lang.String vertex,
java.lang.String fragment)
throws FragmentCompilationException,
VertexCompilationException,
LinkingException
Needs to be called from a thread holding the OpenGL context.
vertex - Vertex shader code.fragment - Fragment shader code.FragmentCompilationExceptionVertexCompilationExceptionLinkingExceptionpublic int getProgramHandle()
public void useProgram()