Aviatrix3D
2.1.0

org.j3d.aviatrix3d.rendering
Interface OffscreenBufferRenderable

All Superinterfaces:
java.lang.Comparable, OffscreenRenderTargetRenderable, Renderable
All Known Implementing Classes:
MRTOffscreenTexture2D, OffscreenTexture2D

public interface OffscreenBufferRenderable
extends OffscreenRenderTargetRenderable

A renderable that represents a separate rendering space to an offscreen buffer, rather than to the main buffer.

This class encapsulates both pbuffer and frame buffer object renderable capabilities.

Assumptions and Requirements

Version:
$Revision: 2.7 $
Author:
Justin Couch

Field Summary
static int FORMAT_ALPHA
          Interpret the texture format as alpha only
static int FORMAT_DEPTH_COMPONENT
          Interpret the texture format as a depth component texture
static int FORMAT_INTENSITY
          Interpret the texture format as intensity only
static int FORMAT_LUMINANCE
          Interpret the texture format as luminance only
static int FORMAT_LUMINANCE_ALPHA
          Interpret the texture format as intensity-alpha
static int FORMAT_RGB
          Interpret the texture format as RGB
static int FORMAT_RGBA
          Interpret the texture format as RGBA
 
Method Summary
 void getClearColor(float[] col)
          Set the background colour that this surface should be cleared to before the drawing step.
 OffscreenRenderTargetRenderable getDepthRenderable()
          If a separate depth render target has been requested, return the renderable for that object now.
 int getFormat()
          Fetch the format of the texture that this buffer should be interpreted as when the texture is applied to the containing object.
 javax.media.opengl.GLCapabilities getGLSetup()
          Deprecated. Use OffscreenRenderTargetRenderable.getBufferSetup() Always returns null
 int getNumRenderTargets()
          Get the number of render targets that this offscreen renderable manages.
 OffscreenRenderTargetRenderable getRenderTargetRenderable(int index)
          Get the child render target at the given index.
 boolean hasBufferResized()
          Check to see if this buffer has resized since the last time it was used.
 boolean hasSeparateDepthRenderable()
          Check to see if the depth buffer has its own separate renderable object.
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.OffscreenRenderTargetRenderable
getBuffer, getBufferSetup, getHeight, getWidth, isChildRenderTarget, registerBuffer, unregisterBuffer
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable
equals
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

FORMAT_ALPHA

static final int FORMAT_ALPHA
Interpret the texture format as alpha only

See Also:
Constant Field Values

FORMAT_INTENSITY

static final int FORMAT_INTENSITY
Interpret the texture format as intensity only

See Also:
Constant Field Values

FORMAT_LUMINANCE

static final int FORMAT_LUMINANCE
Interpret the texture format as luminance only

See Also:
Constant Field Values

FORMAT_LUMINANCE_ALPHA

static final int FORMAT_LUMINANCE_ALPHA
Interpret the texture format as intensity-alpha

See Also:
Constant Field Values

FORMAT_RGB

static final int FORMAT_RGB
Interpret the texture format as RGB

See Also:
Constant Field Values

FORMAT_RGBA

static final int FORMAT_RGBA
Interpret the texture format as RGBA

See Also:
Constant Field Values

FORMAT_DEPTH_COMPONENT

static final int FORMAT_DEPTH_COMPONENT
Interpret the texture format as a depth component texture

See Also:
Constant Field Values
Method Detail

getClearColor

void getClearColor(float[] col)
Set the background colour that this surface should be cleared to before the drawing step. Colours range from 0 to 1 in the normal manner.

Parameters:
col - An array of at least length 4 to copy values into

getGLSetup

javax.media.opengl.GLCapabilities getGLSetup()
Deprecated. Use OffscreenRenderTargetRenderable.getBufferSetup() Always returns null

Get the requested buffer setup that describes this offscreen buffer.

Returns:
The defined capabilities setup for the texture

getFormat

int getFormat()
Fetch the format of the texture that this buffer should be interpreted as when the texture is applied to the containing object.

Returns:
One of the FORMAT_ constants from this interface

getNumRenderTargets

int getNumRenderTargets()
Get the number of render targets that this offscreen renderable manages. This should always return at least 1, being itself.

Returns:
A value greater than zero

getRenderTargetRenderable

OffscreenRenderTargetRenderable getRenderTargetRenderable(int index)
Get the child render target at the given index. If the index 0 is given, this will return a reference to ourselves.

Parameters:
index - The index of the target to fetch
Returns:
The render target at the given index

hasSeparateDepthRenderable

boolean hasSeparateDepthRenderable()
Check to see if the depth buffer has its own separate renderable object. Used when the offscreen needs to create the depth buffer separately as a texture to use in shading.

Returns:
True if a separate depth texture is wanted

getDepthRenderable

OffscreenRenderTargetRenderable getDepthRenderable()
If a separate depth render target has been requested, return the renderable for that object now. If not requested, this returns null.

Returns:
The depth target renderable or null

hasBufferResized

boolean hasBufferResized()
Check to see if this buffer has resized since the last time it was used. If so, recreate the underlying setup, but keep everything else the same. Will reset the flag on read.

Returns:
true if the buffer has resized, requiring reallocation of the underlying buffer objects

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org