From d8293b3a8cf0974e10ea842b0652194799d6e801 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 19 Dec 2010 00:24:59 +0100 Subject: Fix GLProfile initProfilesForDevice and DEBUG ; Fix JoglVersion.getGLInfo GLProfile.initProfilesForDevice: use either desktop or egl factory on one device GLProfile.DEBUG: Print proper factory instance, full device JoglVersion.getGLInfo: Print only availability of used device, otherwise we could kick off initialization --- src/jogl/classes/com/jogamp/opengl/JoglVersion.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/JoglVersion.java') diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java index b096f84ae..b1db2974a 100644 --- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java +++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java @@ -33,8 +33,10 @@ import javax.media.opengl.*; import com.jogamp.common.os.Platform; import com.jogamp.common.util.VersionUtil; import com.jogamp.common.util.JogampVersion; +import com.jogamp.common.util.ReflectionUtil; import com.jogamp.nativewindow.NativeWindowVersion; import java.util.jar.Manifest; +import javax.media.nativewindow.AbstractGraphicsDevice; public class JoglVersion extends JogampVersion { @@ -68,15 +70,17 @@ public class JoglVersion extends JogampVersion { } public static StringBuffer getGLInfo(GL gl, StringBuffer sb) { + AbstractGraphicsDevice device = gl.getContext().getGLDrawable().getNativeSurface() + .getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); if(null==sb) { sb = new StringBuffer(); } GLContext ctx = gl.getContext(); sb.append(VersionUtil.SEPERATOR).append(Platform.getNewline()); - sb.append("Default Desktop ").append(GLProfile.getDefaultDesktopDevice().getConnection()).append(": ").append(GLProfile.glAvailabilityToString(GLProfile.getDefaultDesktopDevice())); - sb.append(Platform.getNewline()); - sb.append("Default EGL ").append(GLProfile.getDefaultEGLDevice().getConnection()).append(": ").append(GLProfile.glAvailabilityToString(GLProfile.getDefaultEGLDevice())); + sb.append(ReflectionUtil.getBaseName(device.getClass())).append("[type ") + .append(device.getType()).append(", connection ").append(device.getConnection()).append("]: ") + .append(GLProfile.glAvailabilityToString(device)); sb.append(Platform.getNewline()); sb.append("Swap Interval ").append(gl.getSwapInterval()); sb.append(Platform.getNewline()); -- cgit v1.2.3