From d2f9cfafd62c39a7a8ede329334d3e29a3843653 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 19 Nov 2006 20:51:57 +0000 Subject: Fixed Issue 213: Expose GLCaps from GLDrawable Added getChosenGLCapabilities() to the GLDrawable interface. Implemented on Windows, Unix and Mac OS X platforms with various techniques. Attempts to provide correct answers in all cases, even when the GLCapabilitiesChooser mechanism is not supported. Required addition of new platform-specific Java code in most cases to either re-convert existing PIXELFORMATDESCRIPTORS / XVisualInfos, or to query the pixel format or visual chosen for drawables like pbuffers for which the chooser mechanism is not (yet) implemented. Tested on Windows, Solaris/x86, and Mac OS X with on-screen, off-screen and pbuffer drawables. (Full support for the Java2D/JOGL bridge is not yet in place; the answer returned from the GLJPanel in this case is currently the default GLCapabilities, and it is likely that "external" GLDrawables will return null.) git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@183 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/gears/Gears.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/demos/gears') diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java index a134614..efd7d09 100644 --- a/src/demos/gears/Gears.java +++ b/src/demos/gears/Gears.java @@ -54,6 +54,8 @@ public class Gears implements GLEventListener, MouseListener, MouseMotionListene System.err.println("INIT GL IS: " + gl.getClass().getName()); + System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities()); + gl.setSwapInterval(1); float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f }; -- cgit v1.2.3