summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/swt
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/com/jogamp/opengl/swt
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/com/jogamp/opengl/swt')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java70
1 files changed, 4 insertions, 66 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
index c94d21369..e58d8c64a 100644
--- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
+++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
@@ -297,40 +297,6 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
}
/**
- * Creates an instance using {@link #GLCanvas(Composite, int, GLCapabilitiesImmutable, GLCapabilitiesChooser, GLContext)}
- * on the SWT thread.
- *
- * @param parent
- * Required (non-null) parent Composite.
- * @param style
- * Optional SWT style bit-field. The {@link SWT#NO_BACKGROUND} bit is set before passing this up to the
- * Canvas constructor, so OpenGL handles the background.
- * @param caps
- * Optional GLCapabilities. If not provided, the default capabilities for the default GLProfile for the
- * graphics device determined by the parent Composite are used. Note that the GLCapabilities that are
- * actually used may differ based on the capabilities of the graphics device.
- * @param chooser
- * Optional GLCapabilitiesChooser to customize the selection of the used GLCapabilities based on the
- * requested GLCapabilities, and the available capabilities of the graphics device.
- * @param shareWith
- * Optional GLContext to share state (textures, vbos, shaders, etc.) with.
- * @return a new instance
- * @deprecated Use {@link #create(Composite, int, GLCapabilitiesImmutable, GLCapabilitiesChooser)}
- * and set shared GLContext via {@link #setSharedContext(GLContext)} or {@link #setSharedAutoDrawable(GLAutoDrawable)}.
- */
- public static GLCanvas create(final Composite parent, final int style, final GLCapabilitiesImmutable caps,
- final GLCapabilitiesChooser chooser, final GLContext shareWith) {
- final GLCanvas[] res = new GLCanvas[] { null };
- parent.getDisplay().syncExec(new Runnable() {
- @Override
- public void run() {
- res[0] = new GLCanvas( parent, style, caps, chooser, shareWith );
- }
- });
- return res[0];
- }
-
- /**
* Creates a new SWT GLCanvas.
*
* @param parent
@@ -348,31 +314,6 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
*/
public GLCanvas(final Composite parent, final int style, final GLCapabilitiesImmutable capsReqUser,
final GLCapabilitiesChooser capsChooser) {
- this(parent, style, capsReqUser, capsChooser, null);
- }
-
- /**
- * Creates a new SWT GLCanvas.
- *
- * @param parent
- * Required (non-null) parent Composite.
- * @param style
- * Optional SWT style bit-field. The {@link SWT#NO_BACKGROUND} bit is set before passing this up to the
- * Canvas constructor, so OpenGL handles the background.
- * @param capsReqUser
- * Optional GLCapabilities. If not provided, the default capabilities for the default GLProfile for the
- * graphics device determined by the parent Composite are used. Note that the GLCapabilities that are
- * actually used may differ based on the capabilities of the graphics device.
- * @param capsChooser
- * Optional GLCapabilitiesChooser to customize the selection of the used GLCapabilities based on the
- * requested GLCapabilities, and the available capabilities of the graphics device.
- * @param shareWith
- * Optional GLContext to share state (textures, vbos, shaders, etc.) with.
- * @deprecated Use {@link #GLCanvas(Composite, int, GLCapabilitiesImmutable, GLCapabilitiesChooser)}
- * and set shared GLContext via {@link #setSharedContext(GLContext)} or {@link #setSharedAutoDrawable(GLAutoDrawable)}.
- */
- public GLCanvas(final Composite parent, final int style, GLCapabilitiesImmutable capsReqUser,
- final GLCapabilitiesChooser capsChooser, final GLContext shareWith) {
/* NO_BACKGROUND required to avoid clearing bg in native SWT widget (we do this in the GL display) */
super(parent, style | SWT.NO_BACKGROUND);
@@ -399,16 +340,13 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
screen = SWTAccessor.getScreen(swtDevice, -1 /* default */);
}
- /* Select default GLCapabilities if none was provided, otherwise clone provided caps to ensure safety */
+ /* Select default GLCapabilities if none was provided, otherwise use cloned provided caps */
if(null == capsReqUser) {
- capsReqUser = new GLCapabilities(GLProfile.getDefault(screen.getDevice()));
+ this.capsRequested = new GLCapabilities(GLProfile.getDefault(screen.getDevice()));
+ } else {
+ this.capsRequested = (GLCapabilitiesImmutable) capsReqUser.cloneMutable();
}
-
- this.capsRequested = capsReqUser;
this.capsChooser = capsChooser;
- if( null != shareWith ) {
- helper.setSharedContext(null, shareWith);
- }
// post create .. when ready
gdkWindow = 0;