aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-01-31 07:42:43 +0100
committerSven Gothel <[email protected]>2011-01-31 07:42:43 +0100
commit8adc04788a6d9dd44de5a4636b46d14dbb70b799 (patch)
tree50f63e6d9b7a22d6bb122f34e59a22e546261309 /src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
parent02d5240ccac8875144e5f37c2a4d09375338adc2 (diff)
GLCapabilities enhancements: Choosing, All-Available, Data Handling (X11, WGL and EGL)
- GLDrawableFactory exposes: public final List/*GLCapabilitiesImmutable*/ getAvailableCapabilities(AbstractGraphicsDevice device) - GLCapabilities platform specialization containing native ids (XVisual/FBConfig, PFD, EGLConfig, ..) - GLCapabilities setPbuffer(true) disables onscreen - Capabilities setOnscreen(true) disables pbuffer - Capabilities implements Comparable - *Capabilities: enhanced 'toString(..)' - CapabilitiesChooser.chooseCapabilities: 'CapabilitiesImmutable[] available' -> 'List /*<CapabilitiesImmutable>*/ available' - VersionApplet, GLCanvas.main, GLWindow.main, GLProfile/debug: dumps all available GLCaps - WGLGLCapabilities: proper non-displayeble (pbuffer) pfdid handling TODO: ES/EGL test with emulation
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt/GLCanvas.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index d47501795..acabe58a5 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -54,9 +54,10 @@ import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.geom.Rectangle2D;
-import com.jogamp.common.GlueGenVersion;
-import com.jogamp.common.util.VersionUtil;
-import com.jogamp.common.util.locks.RecursiveLock;
+import java.awt.EventQueue;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
import javax.media.nativewindow.WindowClosingProtocol;
import javax.media.nativewindow.AbstractGraphicsConfiguration;
@@ -69,7 +70,6 @@ import javax.media.nativewindow.awt.AWTGraphicsConfiguration;
import javax.media.nativewindow.awt.AWTGraphicsDevice;
import javax.media.nativewindow.awt.AWTGraphicsScreen;
import javax.media.nativewindow.awt.AWTWindowClosingProtocol;
-import com.jogamp.nativewindow.NativeWindowVersion;
import javax.media.opengl.GL;
import javax.media.opengl.GLAnimatorControl;
@@ -85,14 +85,17 @@ import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
import javax.media.opengl.GLRunnable;
import javax.media.opengl.Threading;
+
+import com.jogamp.nativewindow.NativeWindowVersion;
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.util.VersionUtil;
import com.jogamp.opengl.JoglVersion;
+
+import com.jogamp.common.util.locks.RecursiveLock;
import com.jogamp.opengl.impl.Debug;
import com.jogamp.opengl.impl.GLContextImpl;
import com.jogamp.opengl.impl.GLDrawableHelper;
import com.jogamp.opengl.impl.ThreadingImpl;
-import java.awt.EventQueue;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
// FIXME: Subclasses need to call resetGLFunctionAvailability() on their
// context whenever the displayChanged() function is called on our
@@ -996,6 +999,12 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
System.err.println(NativeWindowVersion.getInstance());
System.err.println(JoglVersion.getInstance());
+ GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
+ List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null);
+ for(int i=0; i<availCaps.size(); i++) {
+ System.err.println(availCaps.get(i));
+ }
+
GLCapabilitiesImmutable caps = new GLCapabilities( GLProfile.getDefault(GLProfile.getDefaultDesktopDevice()) );
Frame frame = new Frame("JOGL AWT Test");