de.grogra.imp3d.glsl.light.shadow
Class GLSLShadowMap

java.lang.Object
  extended by de.grogra.imp3d.glsl.utility.GLSLTexture
      extended by de.grogra.imp3d.glsl.utility.TextureRenderTarget
          extended by de.grogra.imp3d.glsl.light.shadow.GLSLShadowMap
All Implemented Interfaces:
FBOAttachment, GLSLOpenGLObject
Direct Known Subclasses:
GLSLShadowCube, GLSLShadowParallel, GLSLShadowPerspective

public abstract class GLSLShadowMap
extends TextureRenderTarget

This class is the base for all shadowmaps.

Author:
Konni Hartmann

Field Summary
protected  int GRAPH_STAMP
           
protected  boolean invalid
           
 
Fields inherited from class de.grogra.imp3d.glsl.utility.TextureRenderTarget
DEPTHUB, RGBA16F, RGBA16US, RGBA32F, RGBA8UB
 
Fields inherited from class de.grogra.imp3d.glsl.utility.GLSLTexture
height, index, internalFormat, texType, type, width
 
Constructor Summary
GLSLShadowMap()
           
 
Method Summary
abstract  boolean create(javax.media.opengl.GL gl)
           
abstract  boolean create(javax.media.opengl.GL gl, int width, int height)
           
 void delete(OpenGLState glState, boolean javaonly)
           
abstract  void fill(GLSLDisplay disp, OpenGLState glState)
           
abstract  java.lang.Class<?> getDefaultLightType()
           
abstract  GLSLShadowMap getInstance()
           
 Matrix4d getLightToView()
           
 Matrix4d getLightToView(int side)
           
abstract  int getSize()
           
 Matrix4d getViewToClip()
           
protected  void renderCachedScene(GLSLDisplay disp, OpenGLState glState, Matrix4d round)
           
 void setCamDir(Vector3d camDir)
           
 void setCamPos(Point4d camPos)
           
 void setInvalid()
          Mark this Shadow map as invalid may be called to mark changes in matrices that are not covered by changes in graph (for example caching may present a instance to other lightsources)
 void setLightTransf(LightPos light)
           
abstract  void setupTextureMatrices(OpenGLState glState, Matrix4d ViewToWorld, LightPos light)
           
 
Methods inherited from class de.grogra.imp3d.glsl.utility.TextureRenderTarget
attachToFbo, bindTo, create, create, resize, toString
 
Methods inherited from class de.grogra.imp3d.glsl.utility.GLSLTexture
bindTo, cleanup, delete, estimateSizeInByte, getHeight, getIndex, getTexType, getType, getWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.imp3d.glsl.utility.FBOAttachment
estimateSizeInByte
 

Field Detail

GRAPH_STAMP

protected int GRAPH_STAMP

invalid

protected boolean invalid
Constructor Detail

GLSLShadowMap

public GLSLShadowMap()
Method Detail

create

public abstract boolean create(javax.media.opengl.GL gl)

create

public abstract boolean create(javax.media.opengl.GL gl,
                               int width,
                               int height)

delete

public void delete(OpenGLState glState,
                   boolean javaonly)
Specified by:
delete in interface FBOAttachment
Overrides:
delete in class TextureRenderTarget

fill

public abstract void fill(GLSLDisplay disp,
                          OpenGLState glState)

getDefaultLightType

public abstract java.lang.Class<?> getDefaultLightType()

getInstance

public abstract GLSLShadowMap getInstance()

getLightToView

public Matrix4d getLightToView()

getLightToView

public Matrix4d getLightToView(int side)

getSize

public abstract int getSize()

getViewToClip

public Matrix4d getViewToClip()

renderCachedScene

protected void renderCachedScene(GLSLDisplay disp,
                                 OpenGLState glState,
                                 Matrix4d round)

setCamDir

public void setCamDir(Vector3d camDir)

setCamPos

public void setCamPos(Point4d camPos)

setInvalid

public void setInvalid()
Mark this Shadow map as invalid may be called to mark changes in matrices that are not covered by changes in graph (for example caching may present a instance to other lightsources)


setLightTransf

public void setLightTransf(LightPos light)

setupTextureMatrices

public abstract void setupTextureMatrices(OpenGLState glState,
                                          Matrix4d ViewToWorld,
                                          LightPos light)