java.lang.Object
de.grogra.glsl.utility.GLSLShader
de.grogra.glsl.utility.GLSLManagedShader
de.grogra.glsl.material.GLSLMaterial
de.grogra.glsl.material.GLSLRGBAShader
- All Implemented Interfaces:
GLSLOpenGLObject
Implementation of RGBAShader. Will share one glsl program for all shaders
(using uniform values to change color)
- 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 instancebooleanbooleanReturn false if Shader depends only on UniformsvoidsetupDynamicUniforms(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.Methods inherited from class de.grogra.glsl.material.GLSLMaterial
getFragmentShader, mayDiscard, 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
-
GLSLRGBAShader
public GLSLRGBAShader()
-
-
Method Details
-
getAllChannels
- Specified by:
getAllChannelsin classGLSLMaterial
-
getInstance
Description copied from class:GLSLShaderFor "hardcompiled" Shaders this method should return a new instance- Overrides:
getInstancein classGLSLShader- Returns:
-
instanceFor
- Overrides:
instanceForin classGLSLShader- Returns:
- Class 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.
-
setupDynamicUniforms
public 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.
-
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
-
isOpaque
- Overrides:
isOpaquein classGLSLMaterial
-