org.xith3d.render
Class ImageRenderTarget

java.lang.Object
  extended by org.xith3d.render.ImageRenderTarget
All Implemented Interfaces:
RenderTarget

public class ImageRenderTarget
extends java.lang.Object
implements RenderTarget

This type of RenderTarget is used to render (copy) the scene to a BufferedImage. Apply it to a RenderPass to bring it into effect.


Constructor Summary
ImageRenderTarget(GroupNode group)
           
ImageRenderTarget(GroupNode group, org.openmali.vecmath2.Colorf backgroundColor)
           
 
Method Summary
 void copyBufferToImage()
           
 void freeOpenGLResources(Canvas3D canvas)
          This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).
 void freeOpenGLResources(CanvasPeer canvasPeer)
          This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).
 org.openmali.vecmath2.Colorf getBackgroundColor()
           
 java.nio.ByteBuffer getByteBuffer()
           
 GroupNode getGroup()
          
 java.awt.image.BufferedImage getImage()
           
 boolean isBackgroundRenderingEnabled()
          If this is true, the background is rendered into the RenderTarget.
 void setBackgroundColor(org.openmali.vecmath2.Colorf color)
          Sets the color, the texture is to be cleared before the Renderer renders to it.
 void setBackgroundRenderingEnabled(boolean enabled)
          If this is true, the background is rendered into the RenderTarget.
 void setGroup(GroupNode group)
          Sets the Group to be rendered to this RenderTarget.
 void setImage(java.awt.image.BufferedImage image)
          Sets the assotiated Texture instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRenderTarget

public ImageRenderTarget(GroupNode group,
                         org.openmali.vecmath2.Colorf backgroundColor)

ImageRenderTarget

public ImageRenderTarget(GroupNode group)
Method Detail

setGroup

public final void setGroup(GroupNode group)
Sets the Group to be rendered to this RenderTarget.


getGroup

public final GroupNode getGroup()

Specified by:
getGroup in interface RenderTarget
Returns:
the GroupNode to be rendered to this target.

setImage

public final void setImage(java.awt.image.BufferedImage image)
Sets the assotiated Texture instance.

Parameters:
image -

getImage

public final java.awt.image.BufferedImage getImage()
Returns:
the assotiated BufferedImage instance.

getByteBuffer

public final java.nio.ByteBuffer getByteBuffer()

setBackgroundColor

public final void setBackgroundColor(org.openmali.vecmath2.Colorf color)
Sets the color, the texture is to be cleared before the Renderer renders to it. Set this to null to do no clearing.


getBackgroundColor

public final org.openmali.vecmath2.Colorf getBackgroundColor()
Returns:
the color, the texture is to be cleared before the Renderer renders to it. This is null to do no clearing.

setBackgroundRenderingEnabled

public void setBackgroundRenderingEnabled(boolean enabled)
If this is true, the background is rendered into the RenderTarget.

Specified by:
setBackgroundRenderingEnabled in interface RenderTarget

isBackgroundRenderingEnabled

public final boolean isBackgroundRenderingEnabled()
If this is true, the background is rendered into the RenderTarget.

Specified by:
isBackgroundRenderingEnabled in interface RenderTarget

copyBufferToImage

public final void copyBufferToImage()

freeOpenGLResources

public void freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).

Specified by:
freeOpenGLResources in interface RenderTarget

freeOpenGLResources

public final void freeOpenGLResources(Canvas3D canvas)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).

Specified by:
freeOpenGLResources in interface RenderTarget