public class ShaderUtil extends Object
Constructor and Description |
---|
ShaderUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
attachShader(GL _gl,
int program,
IntBuffer shaders) |
static void |
compileShader(GL _gl,
IntBuffer shaders) |
static boolean |
createAndCompileShader(GL _gl,
IntBuffer shader,
int shaderType,
CharSequence[][] sources,
PrintStream verboseOut) |
static boolean |
createAndLoadShader(GL _gl,
IntBuffer shader,
int shaderType,
int binFormat,
Buffer bin,
PrintStream verboseOut) |
static void |
createShader(GL _gl,
int type,
IntBuffer shaders) |
static void |
deleteShader(GL _gl,
IntBuffer shaders) |
static void |
detachShader(GL _gl,
int program,
IntBuffer shaders) |
static String |
getProgramInfoLog(GL _gl,
int programObj) |
static Set<Integer> |
getShaderBinaryFormats(GL _gl)
If supported, queries the natively supported shader binary formats using
GL2ES2.GL_NUM_SHADER_BINARY_FORMATS and GL2ES2.GL_SHADER_BINARY_FORMATS
via GL.glGetIntegerv(int, int[], int) . |
static String |
getShaderInfoLog(GL _gl,
int shaderObj) |
static boolean |
isGeometryShaderSupported(GL _gl)
Returns true if GeometryShader is supported, i.e.
|
static boolean |
isProgramExecStatusValid(GL _gl,
int programObj,
PrintStream verboseOut)
Performs
GL2ES2.glValidateProgram(int) |
static boolean |
isProgramLinkStatusValid(GL _gl,
int programObj,
PrintStream verboseOut) |
static boolean |
isProgramStatusValid(GL _gl,
int programObj,
int name) |
static boolean |
isShaderCompilerAvailable(GL _gl)
Returns true if a hader compiler is available, otherwise false.
|
static boolean |
isShaderStatusValid(GL _gl,
IntBuffer shaders,
int name,
PrintStream verboseOut) |
static boolean |
isShaderStatusValid(GL _gl,
int shaderObj,
int name,
PrintStream verboseOut) |
static void |
shaderBinary(GL _gl,
IntBuffer shaders,
int binFormat,
Buffer bin) |
static void |
shaderSource(GL _gl,
IntBuffer shaders,
CharSequence[][] sources) |
static void |
shaderSource(GL _gl,
int shader,
CharSequence[] source) |
public static boolean isShaderStatusValid(GL _gl, int shaderObj, int name, PrintStream verboseOut)
public static boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name, PrintStream verboseOut)
public static boolean isProgramStatusValid(GL _gl, int programObj, int name)
public static boolean isProgramLinkStatusValid(GL _gl, int programObj, PrintStream verboseOut)
public static boolean isProgramExecStatusValid(GL _gl, int programObj, PrintStream verboseOut)
GL2ES2.glValidateProgram(int)
One shall only call this method while debugging and only if all required resources by the shader are set.
Note: It is possible that a working shader program will fail validation. This has been experienced on NVidia APX2500 and Tegra2.
GL2ES2.glValidateProgram(int)
public static Set<Integer> getShaderBinaryFormats(GL _gl)
GL2ES2.GL_NUM_SHADER_BINARY_FORMATS
and GL2ES2.GL_SHADER_BINARY_FORMATS
via GL.glGetIntegerv(int, int[], int)
.public static boolean isShaderCompilerAvailable(GL _gl)
public static boolean isGeometryShaderSupported(GL _gl)
public static void shaderSource(GL _gl, int shader, CharSequence[] source)
public static void shaderSource(GL _gl, IntBuffer shaders, CharSequence[][] sources)
public static boolean createAndLoadShader(GL _gl, IntBuffer shader, int shaderType, int binFormat, Buffer bin, PrintStream verboseOut)
public static boolean createAndCompileShader(GL _gl, IntBuffer shader, int shaderType, CharSequence[][] sources, PrintStream verboseOut)
Copyright 2010 JogAmp Community.