Class CompiledShader
java.lang.Object
cz.fidentis.analyst.glsl.code.impl.CompiledShader
A proxy object storing the information about a shader compiled on GPU.
-
Constructor Summary
ConstructorsConstructorDescriptionCompiledShader
(com.jogamp.opengl.GLContext glContext, GlslShaderDef shaderDef) Constructor that compiles the shader on GPU. -
Method Summary
-
Constructor Details
-
CompiledShader
public CompiledShader(com.jogamp.opengl.GLContext glContext, GlslShaderDef shaderDef) throws com.jogamp.opengl.GLException Constructor that compiles the shader on GPU.- Parameters:
glContext
- OpenGL context. Must not benull
. Must be at least GL2.shaderDef
- The definition of the shader to be compiled- Throws:
com.jogamp.opengl.GLException
- if the GLSL source file reading or compilation fails
-
-
Method Details
-
release
public void release()Ask GPU to release the shader from its memory. Shaders are removed only after they are not attached to any GLSL program anymore. -
getId
public int getId()Returns the ID of the shader in the OpenGL context- Returns:
- shader's ID
-
getShaderDef
-
equals
-
hashCode
public int hashCode()
-