From ea9e7fdda3b3142682029e746ddf8cf44aeed812 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 12 Dec 2008 02:04:47 +0000 Subject: Fixed breakage of GLJPanel caused by confusion between requested and chosen GLCapabilities. Separated these out and refactored requested GLCapabilities into GLDrawableImpl superclass. Removed setChosenGLCapabilities from the public API and made it protected on GLDrawableImpl. Removed it from all public GLDrawable implementations such as GLCanvas and GLJPanel. Fixed bug in Gears demo where mouse listener was not being hooked up correctly. Tested so far on Windows; testing on other platforms to follow. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1815 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/javax/media/opengl/GLDrawable.java | 5 ----- src/classes/javax/media/opengl/awt/GLCanvas.java | 4 ---- src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java | 14 -------------- 3 files changed, 23 deletions(-) (limited to 'src/classes/javax') diff --git a/src/classes/javax/media/opengl/GLDrawable.java b/src/classes/javax/media/opengl/GLDrawable.java index ec1b5fc2d..f1468c475 100644 --- a/src/classes/javax/media/opengl/GLDrawable.java +++ b/src/classes/javax/media/opengl/GLDrawable.java @@ -139,11 +139,6 @@ public interface GLDrawable { */ public GLCapabilities getChosenGLCapabilities(); - /** - * stores a copy of the passed object - */ - public void setChosenGLCapabilities(GLCapabilities caps); - public NativeWindow getNativeWindow(); public GLDrawableFactory getFactory(); diff --git a/src/classes/javax/media/opengl/awt/GLCanvas.java b/src/classes/javax/media/opengl/awt/GLCanvas.java index bead18bb9..8d4a1df86 100644 --- a/src/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/classes/javax/media/opengl/awt/GLCanvas.java @@ -410,10 +410,6 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { return drawable.getChosenGLCapabilities(); } - public void setChosenGLCapabilities(GLCapabilities caps) { - drawable.setChosenGLCapabilities(caps); - } - public NativeWindow getNativeWindow() { return drawable.getNativeWindow(); } diff --git a/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java b/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java index 5c1932513..69ecb1c99 100644 --- a/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java +++ b/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java @@ -887,20 +887,6 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable { return null; } - public void setChosenGLCapabilities(GLCapabilities caps) { - if (oglPipelineEnabled) { - this.caps = (caps==null) ? null : (GLCapabilities) caps.clone(); - } - - if (hardwareAccelerationDisabled) { - if (offscreenDrawable != null) - offscreenDrawable.setChosenGLCapabilities(caps); - } else { - if (pbuffer != null) - pbuffer.setChosenGLCapabilities(caps); - } - } - public NativeWindow getNativeWindow() { throw new GLException("FIXME"); } -- cgit v1.2.3