Package com.jogamp.opengl.util.glsl
Class ShaderUtil
java.lang.Object
com.jogamp.opengl.util.glsl.ShaderUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidattachShader(GL _gl, int program, IntBuffer shaders) static voidcompileShader(GL _gl, IntBuffer shaders) static booleancreateAndCompileShader(GL _gl, IntBuffer shader, int shaderType, CharSequence[][] sources, PrintStream verboseOut) static booleancreateAndLoadShader(GL _gl, IntBuffer shader, int shaderType, int binFormat, Buffer bin, PrintStream verboseOut) static voidcreateShader(GL _gl, int type, IntBuffer shaders) static voiddeleteShader(GL _gl, IntBuffer shaders) static voiddetachShader(GL _gl, int program, IntBuffer shaders) static StringgetProgramInfoLog(GL _gl, int programObj) getShaderBinaryFormats(GL _gl) If supported, queries the natively supported shader binary formats usingGL2ES2.GL_NUM_SHADER_BINARY_FORMATSandGL2ES2.GL_SHADER_BINARY_FORMATSviaGL.glGetIntegerv(int, int[], int).static StringgetShaderInfoLog(GL _gl, int shaderObj) static booleanReturns true if GeometryShader is supported, i.e.static booleanisProgramExecStatusValid(GL _gl, int programObj, PrintStream verboseOut) PerformsGL2ES2.glValidateProgram(int)static booleanisProgramLinkStatusValid(GL _gl, int programObj, PrintStream verboseOut) static booleanisProgramStatusValid(GL _gl, int programObj, int name) static booleanReturns true if a hader compiler is available, otherwise false.static booleanisShaderStatusValid(GL _gl, int shaderObj, int name, PrintStream verboseOut) static booleanisShaderStatusValid(GL _gl, IntBuffer shaders, int name, PrintStream verboseOut) static voidshaderBinary(GL _gl, IntBuffer shaders, int binFormat, Buffer bin) static voidshaderSource(GL _gl, int shader, CharSequence[] source) static voidshaderSource(GL _gl, IntBuffer shaders, CharSequence[][] sources)
-
Constructor Details
-
ShaderUtil
public ShaderUtil()
-
-
Method Details
-
getShaderInfoLog
-
getProgramInfoLog
-
isShaderStatusValid
-
isShaderStatusValid
public static boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name, PrintStream verboseOut) -
isProgramStatusValid
-
isProgramLinkStatusValid
-
isProgramExecStatusValid
PerformsGL2ES2.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.
- See Also:
-
createShader
-
getShaderBinaryFormats
If supported, queries the natively supported shader binary formats usingGL2ES2.GL_NUM_SHADER_BINARY_FORMATSandGL2ES2.GL_SHADER_BINARY_FORMATSviaGL.glGetIntegerv(int, int[], int). -
isShaderCompilerAvailable
Returns true if a hader compiler is available, otherwise false. -
isGeometryShaderSupported
Returns true if GeometryShader is supported, i.e. whether GLContext is ≥ 3.2 or ARB_geometry_shader4 extension is available. -
shaderSource
-
shaderSource
-
shaderBinary
-
compileShader
-
attachShader
-
detachShader
-
deleteShader
-
createAndLoadShader
public static boolean createAndLoadShader(GL _gl, IntBuffer shader, int shaderType, int binFormat, Buffer bin, PrintStream verboseOut) -
createAndCompileShader
public static boolean createAndCompileShader(GL _gl, IntBuffer shader, int shaderType, CharSequence[][] sources, PrintStream verboseOut)
-