public class ShaderHelper
extends java.lang.Object
Constructor and Description |
---|
ShaderHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
compileShader(int shaderType,
java.lang.String shaderSource)
Helper method to compile shader
|
static int |
createAndLinkProgram(int vertexShaderHandle,
int fragmentShaderHandle,
java.lang.String[] attributes)
Helper method to compile and link a program
|
public static int compileShader(int shaderType, java.lang.String shaderSource)
shaderType
- The shader typeshaderSource
- The shader source codepublic static int createAndLinkProgram(int vertexShaderHandle, int fragmentShaderHandle, java.lang.String[] attributes)
vertexShaderHandle
- An OpenGL handle to an already-compiled vertex shaderfragmentShaderHandle
- An OpenGL handle to an already-compiled fragment shaderattributes
- Attributes that need to be bound to the program