com.metsci.glimpse.support.shader.geometry
Class SimpleShader
java.lang.Object
com.metsci.glimpse.gl.shader.Shader
com.metsci.glimpse.support.shader.geometry.SimpleShader
- Direct Known Subclasses:
- SimpleGeometryShader
public class SimpleShader
- extends Shader
Method Summary |
static ShaderSource |
getSource(java.lang.String shaderFile)
|
static Shader |
passFragment()
|
static Shader |
passVertex()
|
void |
postDisplay(javax.media.opengl.GL gl)
Called right after rendering is complete, just after reverting to the
fixed pipeline functionality. |
void |
preDisplay(javax.media.opengl.GL gl)
Called right after this shader is made current as part of the pipeline. |
boolean |
preLink(javax.media.opengl.GL gl,
int glProgramHandle)
Called right after the program has been compiled, but before it has been
linked. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleShader
public SimpleShader(java.lang.String name,
ShaderType type,
java.lang.String shaderFile)
passVertex
public static Shader passVertex()
passFragment
public static Shader passFragment()
getSource
public static ShaderSource getSource(java.lang.String shaderFile)
preLink
public boolean preLink(javax.media.opengl.GL gl,
int glProgramHandle)
- Description copied from class:
Shader
- Called right after the program has been compiled, but before it has been
linked.
- Specified by:
preLink
in class Shader
- Returns:
- false if any problems specific to this shader are found, true
otherwise
preDisplay
public void preDisplay(javax.media.opengl.GL gl)
- Description copied from class:
Shader
- Called right after this shader is made current as part of the pipeline.
Use this method to update uniform variables for this shader.
- Specified by:
preDisplay
in class Shader
postDisplay
public void postDisplay(javax.media.opengl.GL gl)
- Description copied from class:
Shader
- Called right after rendering is complete, just after reverting to the
fixed pipeline functionality. Use this method for any necessary cleanup
specific to this shader.
- Specified by:
postDisplay
in class Shader
Copyright © 2012 Metron, Inc.. All Rights Reserved.