diff options
author | Sven Gothel <[email protected]> | 2013-01-26 07:43:08 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-01-26 07:43:08 +0100 |
commit | 07fb6ebb3fa95e8d722505883a13c62e13c7f953 (patch) | |
tree | 6adee4edc60f46368a291efa19787a7e54ce6d43 /src/jogl/classes/com/jogamp | |
parent | 176d2c68842587b55117dbe0df2fbd2932d0cd10 (diff) |
Refine GL[Auto]Drawable 'realized' state in API doc, and relax it's realized requirement in GL[Offscreen]AutoDrawableDelegate*
Compatible w/ 'before'.
TODO: Contemplate about GLDrawableFactory.createOffscreenAutoDrawable(..) whether it:
- should better return an unrealized [auto]drawable
- or adding another API method for such case
Goal: Allow passing vector of [device/context/..] for use cases
such as re-using an onscreen destructed surface and on-/offscreen hopping.
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java b/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java index 38315dc72..24116f199 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java +++ b/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java @@ -64,10 +64,10 @@ import jogamp.opengl.GLDrawableImpl; */ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAutoDrawable { /** - * @param drawable a valid and already realized {@link GLDrawable} + * @param drawable a valid {@link GLDrawable}, may not be {@link GLDrawable#isRealized() realized} yet. * @param context a valid {@link GLContext}, * may not have been made current (created) yet, - * may not be associated w/ <code>drawable<code> yet, + * may not be associated w/ <code>drawable<code> yet, * may be <code>null</code> for lazy initialization * @param upstreamWidget optional UI element holding this instance, see {@link #getUpstreamWidget()}. * @param ownDevice pass <code>true</code> if {@link AbstractGraphicsDevice#close()} shall be issued, @@ -81,9 +81,6 @@ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAuto if(null == drawable) { throw new IllegalArgumentException("null drawable"); } - if(!drawable.isRealized()) { - throw new IllegalArgumentException("drawable not realized"); - } this.upstreamWidget = upstreamWidget; this.lock = ( null != lock ) ? lock : LockFactory.createRecursiveLock() ; } @@ -174,6 +171,7 @@ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAuto @Override public final void setRealized(boolean realized) { + drawable.setRealized(realized); } @Override |