public class ProgramManager
extends java.lang.Object
Constructor and Description |
---|
ProgramManager() |
Modifier and Type | Method and Description |
---|---|
Program |
createProgram(java.lang.String programName,
Context context,
int vertexShaderResId,
int fragmentShaderResId,
java.lang.String[] bindAttributes)
Creates a new program.
|
void |
destroy() |
static ProgramManager |
getInstance()
Gets an instance to this singleton object
|
Program |
getProgram(java.lang.String programName)
Gets a compiled OpenGL program
|
boolean |
isProgramLoaded(java.lang.String program) |
void |
recreateAll()
Recreate all current programs
|
public static ProgramManager getInstance()
public void destroy()
public Program createProgram(java.lang.String programName, Context context, int vertexShaderResId, int fragmentShaderResId, java.lang.String[] bindAttributes)
programName
- The name of the program. Vertexshader and fragmentshader
will receive the suffix _vs and _fs respectively.context
- The context from where the ressources can be loadedvertexShaderResId
- The id of the ressource containing the vertex shaderfragmenShaderResId
- The id of the ressource contaiing the fragment shaderpublic Program getProgram(java.lang.String programName)
programName
- Name of the programpublic void recreateAll()
public boolean isProgramLoaded(java.lang.String program)