com.jogamp.opengl
Class OffscreenAutoDrawable

java.lang.Object
  extended by jogamp.opengl.GLAutoDrawableBase
      extended by javax.media.opengl.GLAutoDrawableDelegate
          extended by com.jogamp.opengl.OffscreenAutoDrawable
All Implemented Interfaces:
FPSCounter, GLAutoDrawable, GLDrawable

public class OffscreenAutoDrawable
extends GLAutoDrawableDelegate

Platform-independent class exposing FBO offscreen functionality to applications.

This class distinguishes itself from GLAutoDrawableDelegate with it's setSize(int, int) functionality.


Field Summary
 
Fields inherited from class javax.media.opengl.GLAutoDrawableDelegate
DEBUG
 
Fields inherited from interface javax.media.opengl.GLAutoDrawable
SCREEN_CHANGE_ACTION_ENABLED
 
Fields inherited from interface javax.media.opengl.FPSCounter
DEFAULT_FRAMES_PER_INTERVAL
 
Constructor Summary
OffscreenAutoDrawable(GLDrawable drawable, GLContext context, boolean ownDevice)
           
 
Method Summary
 FBObject getFBObject()
          If the underlying GLDrawable is an FBO implementation and contains an {#link FBObject}, the same is returned.
 boolean setSize(int newWidth, int newHeight)
          Attempts to resize this offscreen auto drawable, if supported by the underlying {@link GLDrawable).
 
Methods inherited from class javax.media.opengl.GLAutoDrawableDelegate
destroy, display, getFactory, getUpstreamWidget, setRealized, swapBuffers, windowDestroyNotifyOp, windowRepaintOp, windowResizedOp
 
Methods inherited from class jogamp.opengl.GLAutoDrawableBase
addGLEventListener, addGLEventListener, createContext, defaultSwapBuffers, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDelegatedDrawable, getFPSStartTime, getGL, getGLProfile, getHandle, getHeight, getLastFPS, getLastFPSPeriod, getLastFPSUpdateTime, getNativeSurface, getSkipContextReleaseThread, getTotalFPS, getTotalFPSDuration, getTotalFPSFrames, getUpdateFPSFrames, getWidth, invoke, isRealized, removeGLEventListener, removeGLEventListener, resetFPSCounter, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setGL, setSkipContextReleaseThread, setUpdateFPSFrames
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.media.opengl.GLDrawable
toString
 

Constructor Detail

OffscreenAutoDrawable

public OffscreenAutoDrawable(GLDrawable drawable,
                             GLContext context,
                             boolean ownDevice)
Parameters:
drawable - a valid GLDrawable, may not be realized yet.
context - a valid GLContext, may not be made current (created) yet.
ownDevice - pass true if AbstractGraphicsDevice.close() shall be issued, otherwise pass false. Closing the device is required in case the drawable is created w/ it's own new instance, e.g. offscreen drawables, and no further lifecycle handling is applied.
Method Detail

setSize

public boolean setSize(int newWidth,
                       int newHeight)
                throws GLException
Attempts to resize this offscreen auto drawable, if supported by the underlying {@link GLDrawable).

Parameters:
newWidth -
newHeight -
Returns:
true if resize was executed, otherwise false.
Throws:
GLException - in case of an error during the resize operation

getFBObject

public FBObject getFBObject()
If the underlying GLDrawable is an FBO implementation and contains an {#link FBObject}, the same is returned. Otherwise returns null.



Copyright 2010 JogAmp Community.