de.grogra.imp3d.glsl.material
public abstract class GLSLMaterial extends GLSLManagedShader
config| Constructor and Description |
|---|
GLSLMaterial() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Result[] |
getAllChannels(java.lang.Object sha) |
protected java.lang.String[] |
getFragmentShader(java.lang.Object sha)
Generate the FragmentShaderCode by using the configuration of the Shader.
|
boolean |
isOpaque(java.lang.Object s) |
boolean |
mayDiscard(java.lang.Object s) |
protected void |
setupDynamicUniforms(javax.media.opengl.GL gl,
GLSLDisplay disp,
java.lang.Object data,
int shaderNo)
Function that loads uniforms of the represented Shader.
|
protected void |
setupShader(javax.media.opengl.GL gl,
GLSLDisplay disp,
java.lang.Object s) |
protected void |
setupUniforms(javax.media.opengl.GL gl,
GLSLDisplay disp,
java.lang.Object s,
int shaderProgramNumber)
Function that loads uniforms of the represented Shader.
|
deleteShader, getConfig, getMaterial_stamp, setConfig, setMaterial_stampactivateShader, cleanup, getInstance, getShaderProgramNumber, getVertexShader, instanceFor, needsRecompilation, printProgramInfoLogprotected abstract Result[] getAllChannels(java.lang.Object sha)
protected java.lang.String[] getFragmentShader(java.lang.Object sha)
getFragmentShader in class GLSLShaderpublic boolean isOpaque(java.lang.Object s)
public boolean mayDiscard(java.lang.Object s)
s - GroImp Shader that acts as a base for this shaderprotected void setupDynamicUniforms(javax.media.opengl.GL gl,
GLSLDisplay disp,
java.lang.Object data,
int shaderNo)
GLSLShadersetupDynamicUniforms in class GLSLShaderdisp - GLSLDisplay that tries using this shaderdata - The GroIMP-Shader-Object represented by this shader.protected void setupShader(javax.media.opengl.GL gl,
GLSLDisplay disp,
java.lang.Object s)
setupShader in class GLSLShaderprotected void setupUniforms(javax.media.opengl.GL gl,
GLSLDisplay disp,
java.lang.Object s,
int shaderProgramNumber)
setupShader(GL, GLSLDisplay, Object).
Use this to add special uniforms instead of overloading setupShader(GL, GLSLDisplay, Object).
Used by SideSwitchShader to initialize both shaders.gl - disp - GLSLDisplay that tries using this shaders - The GroIMP-Shader-Object represented by this shader.