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
-
Method Summary
Modifier and TypeMethodDescriptionprotected Result[]
getAllChannels
(Object sha) For "hardcompiled" Shaders this method should return a new instanceboolean
boolean
Return false if Shader depends only on Uniformsvoid
setupDynamicUniforms
(javax.media.opengl.GL gl, GLSLDisplay disp, Object data, int shaderNo) Function that loads uniforms of the represented Shader.protected void
setupUniforms
(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, setupShader
Methods inherited from class de.grogra.glsl.utility.GLSLManagedShader
deleteShader, getConfig, getMaterial_stamp, setConfig, setMaterial_stamp
Methods inherited from class de.grogra.glsl.utility.GLSLShader
activateShader, cleanup, getShaderProgramNumber, getVertexShader, printProgramInfoLog
-
Constructor Details
-
GLSLRGBAShader
public GLSLRGBAShader()
-
-
Method Details
-
getAllChannels
- Specified by:
getAllChannels
in classGLSLMaterial
-
getInstance
Description copied from class:GLSLShader
For "hardcompiled" Shaders this method should return a new instance- Overrides:
getInstance
in classGLSLShader
- Returns:
-
instanceFor
- Overrides:
instanceFor
in 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:GLSLMaterial
Function 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:
setupUniforms
in classGLSLMaterial
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:GLSLShader
Function that loads uniforms of the represented Shader.- Overrides:
setupDynamicUniforms
in classGLSLMaterial
disp
- GLSLDisplay that tries using this shaderdata
- The GroIMP-Shader-Object represented by this shader.
-
needsRecompilation
Description copied from class:GLSLShader
Return false if Shader depends only on Uniforms- Overrides:
needsRecompilation
in classGLSLShader
- Returns:
- true, if Sourcecode needs to be regenerated and recompiled
-
isOpaque
- Overrides:
isOpaque
in classGLSLMaterial
-