gestalt.candidates.ssao
Class FrameBufferDepth

java.lang.Object
  extended by gestalt.shape.material.TexturePlugin
      extended by gestalt.impl.jogl.shape.material.JoglTexturePlugin
          extended by gestalt.candidates.ssao.FrameBufferDepth
All Implemented Interfaces:
Disposable, Drawable, MaterialPlugin

public class FrameBufferDepth
extends JoglTexturePlugin
implements Drawable


Field Summary
 MaterialPlugin shader
           
 
Fields inherited from class gestalt.shape.material.TexturePlugin
ERROR_BITMAP_REFERANCE_NULL, ERROR_EXCEEDED_SIZE, HINT_TEXTURE_FLIP_Y_AXIS
 
Constructor Summary
FrameBufferDepth(int theWidth, int theHeight, Camera theCamera, JoglTexCreator theTexGenerator)
           
FrameBufferDepth(int theWidth, int theHeight, Camera theCamera, JoglTexCreator theTexGenerator, BufferInfo theBufferID)
           
FrameBufferDepth(int theWidth, int theHeight, JoglTexCreator theTexGenerator)
           
 
Method Summary
 void add(Drawable theDrawable)
          this method is commonly used to store children of a drawable.
 Color backgroundcolor()
           
 void begin(GLContext theRenderContext, Material theParent)
           
 RenderBin bin()
           
 void bindBuffer(GL gl)
           
 Bitmap bitmap()
           
 Camera camera()
           
static boolean checkFrameBufferStatus(GL gl)
           
static FrameBufferDepth createDefault(int theFBOWidth, int theFBOHeight, Camera theCamera)
           
static FrameBufferDepth createDefault(int theFBOWidth, int theFBOHeight, Camera theCamera, boolean theColorBufferClearing, boolean theDepthBufferClearing)
           
static JoglMultiTexPlane createView(FrameBufferDepth theFBO)
           
 void draw(GLContext theRenderContext)
          this method is used to draw the drawable, when the context is ready.
 void end(GLContext theRenderContext, Material theParent)
           
 BufferInfo getBufferInfo()
           
 int getMaxTextureSize()
           
 int getOpenGLTextureID()
           
 int getPixelHeight()
           
 int getPixelWidth()
           
 float[] getSortData()
          returns the data upon which a sort value is calculated.
 float getSortValue()
          returns the last sort value.
 void init(GL gl)
           
 void initStatic(GL gl)
           
 boolean isActive()
          returns whether the drawable is active.
 boolean isSortable()
          returns true if the 'drawable' should be sorted before drawing.
 void load(Bitmap theBitmap)
           
 void reload()
           
 Drawable remove(Drawable theDrawable)
           
 JoglTexturePlugin secondary_texture()
           
 void setActive(boolean theIsActive)
           
 void setAttachmentPoint(int theAttachmentPoint)
           
 void setBitmapRef(Bitmap theBitmap)
           
 void setCameraRef(Camera theCamera)
           
 void setSortValue(float theSortValue)
          caches the current sort value.
static void unbindBuffer(GL gl)
           
 void update(GL gl, GLU glu)
           
 
Methods inherited from class gestalt.impl.jogl.shape.material.JoglTexturePlugin
bind, disable, dispose, enable, getFormat, getOpenGLType, getTextureTargetAsString, setInitialized, setOpenGLTextureID
 
Methods inherited from class gestalt.shape.material.TexturePlugin
bordercolor, getFilterType, getTextureTarget, getTextureUnit, getWrapMode, isInitialized, nonpoweroftwotexturerescale, position, rotation, scale, setFilterType, setTextureTarget, setTextureUnit, setWrapMode, validateBitmapSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shader

public MaterialPlugin shader
Constructor Detail

FrameBufferDepth

public FrameBufferDepth(int theWidth,
                        int theHeight,
                        JoglTexCreator theTexGenerator)

FrameBufferDepth

public FrameBufferDepth(int theWidth,
                        int theHeight,
                        Camera theCamera,
                        JoglTexCreator theTexGenerator)

FrameBufferDepth

public FrameBufferDepth(int theWidth,
                        int theHeight,
                        Camera theCamera,
                        JoglTexCreator theTexGenerator,
                        BufferInfo theBufferID)
Method Detail

setAttachmentPoint

public void setAttachmentPoint(int theAttachmentPoint)

createView

public static JoglMultiTexPlane createView(FrameBufferDepth theFBO)

createDefault

public static FrameBufferDepth createDefault(int theFBOWidth,
                                             int theFBOHeight,
                                             Camera theCamera,
                                             boolean theColorBufferClearing,
                                             boolean theDepthBufferClearing)

createDefault

public static FrameBufferDepth createDefault(int theFBOWidth,
                                             int theFBOHeight,
                                             Camera theCamera)

initStatic

public void initStatic(GL gl)
Overrides:
initStatic in class JoglTexturePlugin

setCameraRef

public void setCameraRef(Camera theCamera)

camera

public Camera camera()

draw

public void draw(GLContext theRenderContext)
Description copied from interface: Drawable
this method is used to draw the drawable, when the context is ready. although the behavior sometimes varies and doesn t always need to have a visual representation depending on the implementation.

Specified by:
draw in interface Drawable
Parameters:
theRenderContext - GLContext

backgroundcolor

public Color backgroundcolor()

getPixelWidth

public int getPixelWidth()
Overrides:
getPixelWidth in class TexturePlugin

getPixelHeight

public int getPixelHeight()
Overrides:
getPixelHeight in class TexturePlugin

getOpenGLTextureID

public int getOpenGLTextureID()
Overrides:
getOpenGLTextureID in class JoglTexturePlugin

add

public void add(Drawable theDrawable)
Description copied from interface: Drawable
this method is commonly used to store children of a drawable.

Specified by:
add in interface Drawable
Parameters:
theDrawable - Drawable

bin

public RenderBin bin()

remove

public Drawable remove(Drawable theDrawable)

secondary_texture

public JoglTexturePlugin secondary_texture()

init

public final void init(GL gl)

getBufferInfo

public BufferInfo getBufferInfo()

bindBuffer

public final void bindBuffer(GL gl)

unbindBuffer

public static final void unbindBuffer(GL gl)

checkFrameBufferStatus

public static boolean checkFrameBufferStatus(GL gl)

update

public void update(GL gl,
                   GLU glu)
Overrides:
update in class JoglTexturePlugin

load

public void load(Bitmap theBitmap)
Overrides:
load in class TexturePlugin

reload

public void reload()
Overrides:
reload in class TexturePlugin

bitmap

public Bitmap bitmap()
Overrides:
bitmap in class TexturePlugin

setBitmapRef

public void setBitmapRef(Bitmap theBitmap)
Overrides:
setBitmapRef in class TexturePlugin

begin

public void begin(GLContext theRenderContext,
                  Material theParent)
Specified by:
begin in interface MaterialPlugin
Overrides:
begin in class JoglTexturePlugin

end

public void end(GLContext theRenderContext,
                Material theParent)
Specified by:
end in interface MaterialPlugin
Overrides:
end in class JoglTexturePlugin

isActive

public boolean isActive()
Description copied from interface: Drawable
returns whether the drawable is active. it is commonly implemented so that the drawables 'draw' method will be ommitted if 'isActive' return false, although this behavior can vary depending on the implementation.

Specified by:
isActive in interface Drawable
Returns:
boolean

setActive

public void setActive(boolean theIsActive)

getSortValue

public float getSortValue()
Description copied from interface: Drawable
returns the last sort value.

Specified by:
getSortValue in interface Drawable
Returns:
float

setSortValue

public void setSortValue(float theSortValue)
Description copied from interface: Drawable
caches the current sort value.

Specified by:
setSortValue in interface Drawable
Parameters:
theSortValue - float

getSortData

public float[] getSortData()
Description copied from interface: Drawable
returns the data upon which a sort value is calculated.

Specified by:
getSortData in interface Drawable
Returns:
float[]

isSortable

public boolean isSortable()
Description copied from interface: Drawable
returns true if the 'drawable' should be sorted before drawing.

Specified by:
isSortable in interface Drawable
Returns:
boolean

getMaxTextureSize

public int getMaxTextureSize()
Overrides:
getMaxTextureSize in class JoglTexturePlugin


processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009