de.grogra.imp3d.glsl.renderpass
Class RenderPass

java.lang.Object
  extended by de.grogra.imp3d.glsl.renderpass.RenderPass
Direct Known Subclasses:
DepthPeelingPass, DepthPeelingPass, ExtractLayerPass, ExtractLayerPass, FullQualityRenderPass, FullQualityRenderPass, FullRenderPass, PresentDebugImagePass, PresentDebugImagePass, PresentScenePass, PresentScenePass, ProcessLightingPass, ProcessLightingPass, ShadowMapGenerationPass

public abstract class RenderPass
extends java.lang.Object


Field Summary
protected  GLSLUpdateCache newVisit
           
 
Constructor Summary
RenderPass()
           
 
Method Summary
static void activateTextures(javax.media.opengl.GL gl, int[] img, int cnt)
           
static void activateTextures(javax.media.opengl.GL gl, int[] img, int cnt, int type)
          Bind Textures present in img-Array.
static void deactivateTextures(javax.media.opengl.GL gl, int cnt)
           
static void deactivateTextures(javax.media.opengl.GL gl, int cnt, int type)
          Deactivate Texture bindings from Texture-offset to Texture-cnt+offset
static void drawPrjQuad(OpenGLState glState, Camera c)
           
static void drawPrjQuad(OpenGLState glState, Camera c, float x, float y, float width, float height)
           
static void drawPrjQuad(OpenGLState glState, Camera c, float x, float y, float width, float height, double angle)
          Draw a fullscreen Quad (only useful in orthogonal mode)
static void drawPrjQuadParallel(OpenGLState glState, Camera c, float x, float y, float width, float height, double projectionWidth)
          Draw a fullscreen Quad (only useful in orthogonal mode)
protected abstract  void epilogue(GLSLDisplay disp, OpenGLState glState, java.lang.Object data)
           
protected  int getID()
           
 void postDrawCallback(Drawable dr, OpenGLState glState, GLSLDisplay disp)
           
 void process(GLSLDisplay disp, OpenGLState glState, java.lang.Object data)
           
protected abstract  void prologue(GLSLDisplay disp, OpenGLState glState, java.lang.Object data)
           
protected abstract  void render(GLSLDisplay disp, OpenGLState glState, java.lang.Object data)
           
 void renderAndUpdateVector(GLSLDisplay disp, Matrix4d worldToView, java.util.Vector<Drawable> cache)
           
 void renderVector(GLSLDisplay disp, Matrix4d worldToView, boolean normal, java.util.Vector<Drawable> cache)
           
 void resetMatrix(OpenGLState glState, int count)
           
 void setMatrix(OpenGLState glState, int where, Matrix4d which)
           
static void ViewOrtho(OpenGLState glState)
           
static void ViewOrtho(OpenGLState glState, int width, int height)
          construct an orthogranal view matrix for easing full screen quad drawing
static void ViewPerspective(OpenGLState glState)
          change view matrix back to default
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newVisit

protected GLSLUpdateCache newVisit
Constructor Detail

RenderPass

public RenderPass()
Method Detail

activateTextures

public static void activateTextures(javax.media.opengl.GL gl,
                                    int[] img,
                                    int cnt)

activateTextures

public static void activateTextures(javax.media.opengl.GL gl,
                                    int[] img,
                                    int cnt,
                                    int type)
Bind Textures present in img-Array. Up to cnt Textures are bound

Parameters:
img - Array containing ids for OpenGL Textures.
cnt - Maximum number of Textures that will be activated starting with img[0].
type -

deactivateTextures

public static void deactivateTextures(javax.media.opengl.GL gl,
                                      int cnt)

deactivateTextures

public static void deactivateTextures(javax.media.opengl.GL gl,
                                      int cnt,
                                      int type)
Deactivate Texture bindings from Texture-offset to Texture-cnt+offset

Parameters:
cnt - Number of Textures that should be deactivated
type -

drawPrjQuad

public static void drawPrjQuad(OpenGLState glState,
                               Camera c)

drawPrjQuad

public static void drawPrjQuad(OpenGLState glState,
                               Camera c,
                               float x,
                               float y,
                               float width,
                               float height)

drawPrjQuad

public static void drawPrjQuad(OpenGLState glState,
                               Camera c,
                               float x,
                               float y,
                               float width,
                               float height,
                               double angle)
Draw a fullscreen Quad (only useful in orthogonal mode)

Parameters:
c -

drawPrjQuadParallel

public static void drawPrjQuadParallel(OpenGLState glState,
                                       Camera c,
                                       float x,
                                       float y,
                                       float width,
                                       float height,
                                       double projectionWidth)
Draw a fullscreen Quad (only useful in orthogonal mode)

Parameters:
c -

epilogue

protected abstract void epilogue(GLSLDisplay disp,
                                 OpenGLState glState,
                                 java.lang.Object data)

getID

protected int getID()

postDrawCallback

public void postDrawCallback(Drawable dr,
                             OpenGLState glState,
                             GLSLDisplay disp)

process

public void process(GLSLDisplay disp,
                    OpenGLState glState,
                    java.lang.Object data)

prologue

protected abstract void prologue(GLSLDisplay disp,
                                 OpenGLState glState,
                                 java.lang.Object data)

render

protected abstract void render(GLSLDisplay disp,
                               OpenGLState glState,
                               java.lang.Object data)

renderAndUpdateVector

public void renderAndUpdateVector(GLSLDisplay disp,
                                  Matrix4d worldToView,
                                  java.util.Vector<Drawable> cache)

renderVector

public void renderVector(GLSLDisplay disp,
                         Matrix4d worldToView,
                         boolean normal,
                         java.util.Vector<Drawable> cache)

resetMatrix

public void resetMatrix(OpenGLState glState,
                        int count)

setMatrix

public void setMatrix(OpenGLState glState,
                      int where,
                      Matrix4d which)

ViewOrtho

public static void ViewOrtho(OpenGLState glState)

ViewOrtho

public static void ViewOrtho(OpenGLState glState,
                             int width,
                             int height)
construct an orthogranal view matrix for easing full screen quad drawing


ViewPerspective

public static void ViewPerspective(OpenGLState glState)
change view matrix back to default