|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.graphics.opengl.GLSL
public class GLSL
A few static utility methods for loading and compiling GLSL vertex and fragment shaders
| Constructor Summary | |
|---|---|
GLSL()
|
|
| Method Summary | |
|---|---|
static int |
compileShader(GLRenderContext gl,
String[] shaderText,
int shaderType)
Compiles a shader program text, and returns the shader handle. |
static int |
createShaderProgram(GLRenderContext gl,
String[] vertexShaderText,
String[] fragmentShaderText)
Compiles vertex/frament program texts, allocates a shader program, attaches the compiles vertex and fragment shaders t the rogram, and links the program. |
static int |
createShaderProgram(GLRenderContext gl,
String vertexShaderText,
String fragmentShaderText)
Compiles vertex/frament program texts, allocates a shader program, attaches the compiles vertex and fragment shaders t the rogram, and links the program. |
static int |
loadShaderProgram(GLRenderContext gl,
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. |
static String |
loadShaderText(Resources resources,
String shaderName)
Loads a shader text from file, and returns the shadre program text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GLSL()
| Method Detail |
|---|
public static int compileShader(GLRenderContext gl,
String[] shaderText,
int shaderType)
public static int createShaderProgram(GLRenderContext gl,
String vertexShaderText,
String fragmentShaderText)
public static int createShaderProgram(GLRenderContext gl,
String[] vertexShaderText,
String[] fragmentShaderText)
public static String loadShaderText(Resources resources,
String shaderName)
public static int loadShaderProgram(GLRenderContext gl,
Resources resources,
String shaderProgramName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||