java.lang.Object
de.grogra.glsl.utility.GLSLShader
de.grogra.glsl.utility.GLSLManagedShader
de.grogra.glsl.material.GLSLMaterial
de.grogra.glsl.material.GLSLSideSwitchShader
- All Implemented Interfaces:
GLSLOpenGLObject
Implementation of Shader: SideSwitch. Will recompile on every property change!
- Author:
- Konni Hartmann
-
Field Summary
Fields inherited from class de.grogra.glsl.utility.GLSLManagedShader
config -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Result[]getAllChannels(Object sha) For "hardcompiled" Shaders this method should return a new instancebooleanbooleanmayDiscard(Object s) booleanReturn false if Shader depends only on Uniformsprotected voidsetupDynamicUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, Object data, int shaderNo) Function that loads uniforms of the represented Shader.protected voidsetupUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, Object s, int shaderProgramNumber) Function that loads uniforms of the represented Shader.voidMethods inherited from class de.grogra.glsl.material.GLSLMaterial
getFragmentShader, setupShaderMethods inherited from class de.grogra.glsl.utility.GLSLManagedShader
deleteShader, getConfig, getMaterial_stamp, setConfig, setMaterial_stampMethods inherited from class de.grogra.glsl.utility.GLSLShader
activateShader, cleanup, getShaderProgramNumber, getVertexShader, printProgramInfoLog
-
Constructor Details
-
GLSLSideSwitchShader
public GLSLSideSwitchShader()
-
-
Method Details
-
getAllChannels
- Specified by:
getAllChannelsin classGLSLMaterial
-
setupDynamicUniforms
protected void setupDynamicUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, Object data, int shaderNo) Description copied from class:GLSLShaderFunction that loads uniforms of the represented Shader.- Overrides:
setupDynamicUniformsin classGLSLMaterial- Parameters:
gl-disp- GLSLDisplay that tries using this shaderdata- The GroIMP-Shader-Object represented by this shader.
-
setupUniforms
protected void setupUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, Object s, int shaderProgramNumber) Description copied from class:GLSLMaterialFunction that loads uniforms of the represented Shader. Called byGLSLMaterial.setupShader(GL, GLSLDisplay, Object). Use this to add special uniforms instead of overloadingGLSLMaterial.setupShader(GL, GLSLDisplay, Object). Used by SideSwitchShader to initialize both shaders.- Overrides:
setupUniformsin classGLSLMaterial- Parameters:
gl-disp- GLSLDisplay that tries using this shaders- The GroIMP-Shader-Object represented by this shader.
-
instanceFor
- Overrides:
instanceForin classGLSLShader- Returns:
- Class represented by this Shader
-
needsRecompilation
Description copied from class:GLSLShaderReturn false if Shader depends only on Uniforms- Overrides:
needsRecompilationin classGLSLShader- Returns:
- true, if Sourcecode needs to be regenerated and recompiled
-
getInstance
Description copied from class:GLSLShaderFor "hardcompiled" Shaders this method should return a new instance- Overrides:
getInstancein classGLSLShader- Returns:
-
mayDiscard
- Overrides:
mayDiscardin classGLSLMaterial- Parameters:
s- GroImp Shader that acts as a base for this shader- Returns:
- True, if fragments may be discarded by this shader
-
isOpaque
- Overrides:
isOpaquein classGLSLMaterial
-
updateShaderRefs
-