j3d.org Aviatrix3D

org.j3d.aviatrix3d
Interface OffscreenTextureSource

All Known Implementing Classes:
OffscreenTexture2D

public interface OffscreenTextureSource

Marker describing a texture that is rendered to an offscreen buffer, using OpenGL pBuffers.

Version:
$Revision: 1.3 $
Author:
Justin Couch

Method Summary
 net.java.games.jogl.GLPbuffer getBuffer(java.lang.Object obj)
          Get the currently registered pBuffer for the given key object.
 void getClearColor(float[] col)
          Set the background colour that this surface should be cleared to before the drawing step.
 net.java.games.jogl.GLCapabilities getGLSetup()
          Get the requested buffer setup that describes this offscreen texture.
 int getHeight()
          Get the height of the texture in pixels.
 Scene getRenderedScene()
          Get the root of the currently rendered scene.
 int getWidth()
          Get the width of the texture in pixels.
 boolean isRepaintRequired()
          Get the current state of the repainting enabled flag.
 void registerBuffer(java.lang.Object obj, net.java.games.jogl.GLPbuffer buffer)
          Register a pBuffer for a given key object.
 void unregisterBuffer(java.lang.Object obj)
          Remove an already registered pBuffer for a given key object.
 

Method Detail

getRenderedScene

public Scene getRenderedScene()
Get the root of the currently rendered scene. If none is set, this will return null.

Returns:
The current scene root or null.

getHeight

public int getHeight()
Get the height of the texture in pixels. If no image is set, this returns -1.

Returns:
a number >= -1

getWidth

public int getWidth()
Get the width of the texture in pixels. If no image is set, this returns -1.

Returns:
a number >= -1

getGLSetup

public net.java.games.jogl.GLCapabilities getGLSetup()
Get the requested buffer setup that describes this offscreen texture.

Returns:
The defined capabilities setup for the texture

getBuffer

public net.java.games.jogl.GLPbuffer getBuffer(java.lang.Object obj)
Get the currently registered pBuffer for the given key object. If there is no buffer registered for the current context, return null.

Parameters:
obj - The key used to register the buffer with
Returns:
buffer The buffer instance to use here.

registerBuffer

public void registerBuffer(java.lang.Object obj,
                           net.java.games.jogl.GLPbuffer buffer)
Register a pBuffer for a given key object.

Parameters:
obj - The key used to register the buffer with
buffer - The buffer instance to use here.

unregisterBuffer

public void unregisterBuffer(java.lang.Object obj)
Remove an already registered pBuffer for a given key object.

Parameters:
obj - The key used to register the buffer with

isRepaintRequired

public boolean isRepaintRequired()
Get the current state of the repainting enabled flag.

Returns:
true when the texture requires re-drawing

getClearColor

public 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

j3d.org Aviatrix3D

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