From ec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 10 Jul 2014 01:11:00 +0200 Subject: 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 --- .../jogamp/opengl/GLDrawableFactoryImpl.java | 48 ---------------------- 1 file changed, 48 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java') diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java index 1aca29d0a..0b119b50d 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java @@ -59,7 +59,6 @@ import javax.media.opengl.GLDrawableFactory; import javax.media.opengl.GLException; import javax.media.opengl.GLFBODrawable; import javax.media.opengl.GLOffscreenAutoDrawable; -import javax.media.opengl.GLPbuffer; import javax.media.opengl.GLProfile; import com.jogamp.nativewindow.MutableGraphicsConfiguration; @@ -74,7 +73,6 @@ import com.jogamp.opengl.GLRendererQuirks; Independent Bitmaps on Windows, pixmaps on X11). Direct access to these GLDrawables is not supplied directly to end users, though they may be instantiated by the GLJPanel implementation. */ -@SuppressWarnings("deprecation") public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { protected static final boolean DEBUG = GLDrawableFactory.DEBUG; // allow package access @@ -251,37 +249,6 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { @Override public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp); - @Override - public final GLPbuffer createGLPbuffer(final AbstractGraphicsDevice deviceReq, - final GLCapabilitiesImmutable capsRequested, - final GLCapabilitiesChooser chooser, - final int width, - final int height, - final GLContext shareWith) { - if(width<=0 || height<=0) { - throw new GLException("initial size must be positive (were (" + width + " x " + height + "))"); - } - final AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq); - if(null == device) { - throw new GLException("No shared device for requested: "+deviceReq); - } - if ( !canCreateGLPbuffer(device, capsRequested.getGLProfile()) ) { - throw new GLException("Pbuffer not available with device: "+device); - } - - final GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixGLPBufferGLCapabilities(capsRequested); - final GLDrawableImpl drawable = createOffscreenDrawableImpl( createMutableSurfaceImpl(device, true, capsChosen, capsRequested, chooser, - new UpstreamSurfaceHookMutableSize(width, height) ) ); - final GLContextImpl ctx; - if(null != drawable) { - drawable.setRealized(true); - ctx = (GLContextImpl) drawable.createContext(shareWith); - } else { - ctx = null; - } - return new GLPbufferImpl( drawable, ctx); - } - //--------------------------------------------------------------------------- // // Offscreen GLDrawable construction @@ -296,21 +263,6 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { return GLContext.isFBOAvailable(device, glp); } - @Override - public final GLOffscreenAutoDrawable createOffscreenAutoDrawable(final AbstractGraphicsDevice deviceReq, - final GLCapabilitiesImmutable capsRequested, - final GLCapabilitiesChooser chooser, - final int width, final int height, - final GLContext shareWith) { - final GLDrawable drawable = createOffscreenDrawable( deviceReq, capsRequested, chooser, width, height ); - drawable.setRealized(true); - final GLContext context = drawable.createContext(shareWith); - if(drawable instanceof GLFBODrawableImpl) { - return new GLOffscreenAutoDrawableImpl.FBOImpl( (GLFBODrawableImpl)drawable, context, null, null ); - } - return new GLOffscreenAutoDrawableImpl( drawable, context, null, null); - } - @Override public final GLOffscreenAutoDrawable createOffscreenAutoDrawable(final AbstractGraphicsDevice deviceReq, final GLCapabilitiesImmutable capsRequested, -- cgit v1.2.3