|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.graphics.opengl.GLShaderProgramLoader
public class GLShaderProgramLoader
A few static utility methods for loading and compiling GLSL shaders
| Field Summary | |
|---|---|
static String |
DEFAULT_SHADER_RESOURCE_DIR
|
private static ResourcePool |
pool
|
| Constructor Summary | |
|---|---|
GLShaderProgramLoader()
|
|
| Method Summary | |
|---|---|
static void |
addShaderDirectory(String dir)
Adds the specified directory as one of the resource directories for GLShaders |
static GLShaderProgram |
getGLShaderProgram(String resourceName)
Tries to get a GLShader with the specified resource name. |
private static GLShaderProgram |
readFromResourceFile(Resources resources,
String shaderProgramName)
Loads a shader program, consisting of a vertex shader and a fragment shader, from two files, located within a resources directory. |
private static String |
readShaderFromResourceFile(Resources resources,
String shaderName)
Loads a shader text from file, and returns the shader program text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static ResourcePool pool
public static final String DEFAULT_SHADER_RESOURCE_DIR
| Constructor Detail |
|---|
public GLShaderProgramLoader()
| Method Detail |
|---|
public static void addShaderDirectory(String dir)
public static GLShaderProgram getGLShaderProgram(String resourceName)
private static String readShaderFromResourceFile(Resources resources,
String shaderName)
private static GLShaderProgram readFromResourceFile(Resources resources,
String shaderProgramName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||