aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-10 01:11:00 +0200
committerSven Gothel <[email protected]>2014-07-10 01:11:00 +0200
commitec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25 (patch)
treee405f17400b8d52ffe38347d226ca9927ac4f3ec /src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
parentefa5f1110725d41b7ea58010fe34b2a8aacd185b (diff)
Bug 1031: Remove Deprecated Classes and Methods (JOGL)
Removed Deprecated Class: - com/jogamp/opengl/util/TGAWriter.java - Use TextureIO w/ .tga suffix - com/jogamp/opengl/util/awt/Screenshot.java - Use: - com.jogamp.opengl.util.GLReadBufferUtil, or - com.jogamp.opengl.util.awt.AWTGLReadBufferUtil The latter for reading into AWT BufferedImage See: TestBug461FBOSupersamplingSwingAWT, TestBug605FlippedImageAWT - javax/media/opengl/GLPbuffer.java - Use: caps.setPBuffer(true); final GLAutoDrawable pbuffer = GLDrawableFactory.getFactory( caps.getGLProfile() ).createOffscreenAutoDrawable(null, caps, null, 512, 512); - See: TestPBufferDeadlockAWT, .. Removed Deprecated Methods: - Constructor of AWT-GLCanvas, SWT-GLCanvas, AWT-GLJPanel with argument 'final GLContext shareWith' See GLSharedContextSetter, i.e. glCanvas.setSharedContext(..) ! - GLDrawableFactory.createOffscreenAutoDrawable(..) with argument 'final GLContext shareWith' See GLSharedContextSetter, i.e. offscreenAutoDrawable.setSharedContext(..) ! - GLDrawableFactory.createGLPbuffer(..), see above! - com.jogamp.opengl.util.av.AudioSink 'enqueueData(AudioDataFrame audioDataFrame)', use 'enqueueData(int, ByteBuffer, int)' - GLSharedContextSetter.areAllGLEventListenerInitialized(), migrated to GLAutoDrawable ! - GLBase's - glGetBoundBuffer(int), use getBoundBuffer(int) - glGetBufferSize(int), use getBufferStorage(int).getSize() - glIsVBOArrayBound(), use isVBOArrayBound() - glIsVBOElementArrayBound(), use isVBOElementArrayBound() - NEWT MouseEvent.BUTTON_NUMBER, use BUTTON_COUNT
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLDrawableFactory.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java106
1 files changed, 15 insertions, 91 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 6e7caf8f8..82808a3cb 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -59,10 +59,10 @@ import javax.media.nativewindow.UpstreamSurfaceHook;
import jogamp.opengl.Debug;
-/** <P> Provides a virtual machine- and operating system-independent
- mechanism for creating {@link GLDrawable}s. </P>
-
- <P> The {@link javax.media.opengl.GLCapabilities} objects passed
+/** <p> Provides a virtual machine- and operating system-independent
+ mechanism for creating {@link GLDrawable}s.
+ </p>
+ <p> The {@link javax.media.opengl.GLCapabilities} objects passed
in to the various factory methods are used as a hint for the
properties of the returned drawable. The default capabilities
selection algorithm (equivalent to passing in a null {@link
@@ -72,9 +72,10 @@ import jogamp.opengl.Debug;
GLCapabilitiesChooser} which can select from the available pixel
formats. The GLCapabilitiesChooser mechanism may not be supported
by all implementations or on all platforms, in which case any
- passed GLCapabilitiesChooser will be ignored. </P>
+ passed GLCapabilitiesChooser will be ignored.
+ </p>
- <P> Because of the multithreaded nature of the Java platform's
+ <p> Because of the multithreaded nature of the Java platform's
Abstract Window Toolkit, it is typically not possible to immediately
reject a given {@link GLCapabilities} as being unsupportable by
either returning <code>null</code> from the creation routines or
@@ -83,14 +84,15 @@ import jogamp.opengl.Debug;
implementation will cause a {@link GLException} to be raised
during the first repaint of the {@link javax.media.opengl.awt.GLCanvas} or {@link
javax.media.opengl.awt.GLJPanel} if the capabilities can not be met.<br>
- {@link javax.media.opengl.GLPbuffer} are always
- created immediately and their creation will fail with a
- {@link javax.media.opengl.GLException} if errors occur. </P>
+ {@link GLOffscreenAutoDrawable} are created lazily,
+ see {@link #createOffscreenAutoDrawable(AbstractGraphicsDevice, GLCapabilitiesImmutable, GLCapabilitiesChooser, int, int) createOffscreenAutoDrawable(..)}.
+ </p>
- <P> The concrete GLDrawableFactory subclass instantiated by {@link
+ <p> The concrete GLDrawableFactory subclass instantiated by {@link
#getFactory getFactory} can be changed by setting the system
property <code>opengl.factory.class.name</code> to the
- fully-qualified name of the desired class. </P>
+ fully-qualified name of the desired class.
+ </p>
*/
public abstract class GLDrawableFactory {
@@ -474,57 +476,11 @@ public abstract class GLDrawableFactory {
* incl it's offscreen {@link NativeSurface} with the given capabilites and dimensions.
* <p>
* The {@link GLOffscreenAutoDrawable}'s {@link GLDrawable} is {@link GLDrawable#isRealized() realized}
- * and it's {@link GLContext} assigned but not yet made current.
- * </p>
- * <p>
- * In case the passed {@link GLCapabilitiesImmutable} contains default values, i.e.
- * {@link GLCapabilitiesImmutable#isOnscreen() caps.isOnscreen()} <code> == true</code>,
- * it is auto-configured. Auto configuration will set {@link GLCapabilitiesImmutable caps} to offscreen
- * and FBO <i>or</i> Pbuffer, whichever is available in that order.
- * </p>
- * <p>
- * A FBO based auto drawable, {@link GLOffscreenAutoDrawable.FBO}, is created if both {@link GLCapabilitiesImmutable#isFBO() caps.isFBO()}
- * and {@link GLContext#isFBOAvailable(AbstractGraphicsDevice, GLProfile) canCreateFBO(device, caps.getGLProfile())} is true.
- * </p>
- * <p>
- * A Pbuffer based auto drawable is created if both {@link GLCapabilitiesImmutable#isPBuffer() caps.isPBuffer()}
- * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice, GLProfile) canCreateGLPbuffer(device)} is true.
- * </p>
- * <p>
- * If neither FBO nor Pbuffer is available,
- * a simple pixmap/bitmap auto drawable is created, which is unlikely to be hardware accelerated.
- * </p>
- * <p>
- * The resulting {@link GLOffscreenAutoDrawable} has it's own independent device instance using <code>device</code> details.
- * </p>
- *
- * @param device which {@link AbstractGraphicsDevice#getConnection() connection} denotes the shared device to be used, may be <code>null</code> for the platform's default device.
- * @param caps the requested GLCapabilties
- * @param chooser the custom chooser, may be null for default
- * @param width the requested offscreen width
- * @param height the requested offscreen height
- * @return the created and initialized offscreen {@link GLOffscreenAutoDrawable} instance
- *
- * @throws GLException if any window system-specific errors caused
- * the creation of the Offscreen to fail.
- *
- * @see #createOffscreenDrawable(AbstractGraphicsDevice, GLCapabilitiesImmutable, GLCapabilitiesChooser, int, int)
- * @deprecated Use {@link #createOffscreenAutoDrawable(AbstractGraphicsDevice, GLCapabilitiesImmutable, GLCapabilitiesChooser, int, int)
- */
- public abstract GLOffscreenAutoDrawable createOffscreenAutoDrawable(AbstractGraphicsDevice device,
- GLCapabilitiesImmutable caps,
- GLCapabilitiesChooser chooser,
- int width, int height,
- GLContext shareWith) throws GLException;
-
- /**
- * Creates a {@link GLDrawable#isRealized() realized} {@link GLOffscreenAutoDrawable}
- * incl it's offscreen {@link NativeSurface} with the given capabilites and dimensions.
- * <p>
- * The {@link GLOffscreenAutoDrawable}'s {@link GLDrawable} is {@link GLDrawable#isRealized() realized}
* <i>without</i> an assigned {@link GLContext}, hence not initialized completely.<br>
+ *
* The {@link GLContext} can be assigned later manually via {@link GLAutoDrawable#setContext(GLContext, boolean) setContext(ctx)}
* <i>or</i> it will be created <i>lazily</i> at the 1st {@link GLAutoDrawable#display() display()} method call.<br>
+ *
* <i>Lazy</i> {@link GLContext} creation will take a shared {@link GLContext} into account
* which has been set {@link GLOffscreenAutoDrawable#setSharedContext(GLContext) directly}
* or {@link GLOffscreenAutoDrawable#setSharedAutoDrawable(GLAutoDrawable) via another GLAutoDrawable}.
@@ -716,38 +672,6 @@ public abstract class GLDrawableFactory {
*/
public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp);
- /**
- * Creates a GLPbuffer {@link GLAutoDrawable} with the given capabilites and dimensions.
- * <p>
- * The GLPbuffer drawable is realized and initialized eagerly.
- * </p>
- *
- * See the note in the overview documentation in {@link GLSharedContextSetter} and on
- * <a href="../../../spec-overview.html#SHARING">context sharing</a>.
- *
- * @param device which {@link AbstractGraphicsDevice#getConnection() connection} denotes the shared the target device, may be <code>null</code> for the platform's default device.
- * @param capabilities the requested capabilities
- * @param chooser the custom chooser, may be null for default
- * @param initialWidth initial width of pbuffer
- * @param initialHeight initial height of pbuffer
- * @param shareWith a shared GLContext this GLPbuffer shall use
- *
- * @return the created and initialized {@link GLPbuffer} instance
- *
- * @throws GLException if any window system-specific errors caused
- * the creation of the GLPbuffer to fail.
- *
- * @deprecated {@link GLPbuffer} is deprecated, use {@link #createOffscreenAutoDrawable(AbstractGraphicsDevice, GLCapabilitiesImmutable, GLCapabilitiesChooser, int, int, GLContext)}
- */
- public abstract GLPbuffer createGLPbuffer(AbstractGraphicsDevice device,
- GLCapabilitiesImmutable capabilities,
- GLCapabilitiesChooser chooser,
- int initialWidth,
- int initialHeight,
- GLContext shareWith)
- throws GLException;
-
-
//----------------------------------------------------------------------
// Methods for interacting with third-party OpenGL libraries