From f60a737b18d6763ac1f443fce0b61c844666e2a8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 24 Jul 2015 02:12:06 +0200 Subject: Bug 1146, Bug 1158: Add unit test for GLContext creation after showing tool-tip within JDialog Test passes on GNU/Linux X11 and Windows - both using NVidia driver. Unit test is based on Robin Provost's code as attached in Bug 1158. --- src/jogl/classes/com/jogamp/opengl/JoglVersion.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl') diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java index af16348a8..7589b3776 100644 --- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java +++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java @@ -129,7 +129,14 @@ public class JoglVersion extends JogampVersion { public static StringBuilder getGLInfo(final GL gl, final StringBuilder sb) { return getGLInfo(gl, sb, false); } - public static StringBuilder getGLInfo(final GL gl, StringBuilder sb, final boolean withCapabilitiesAndExtensionInfo) { + public static StringBuilder getGLInfo(final GL gl, final StringBuilder sb, final boolean withCapabilitiesAndExtensionInfo) { + return getGLInfo(gl, sb, true, withCapabilitiesAndExtensionInfo, withCapabilitiesAndExtensionInfo); + } + + public static StringBuilder getGLInfo(final GL gl, StringBuilder sb, + final boolean withAvailabilityInfo, + final boolean withCapabilitiesInfo, + final boolean withExtensionInfo) { final AbstractGraphicsDevice device = gl.getContext().getGLDrawable().getNativeSurface() .getGraphicsConfiguration().getScreen().getDevice(); if(null==sb) { @@ -139,12 +146,14 @@ public class JoglVersion extends JogampVersion { sb.append(VersionUtil.SEPERATOR).append(Platform.getNewline()); sb.append(device.getClass().getSimpleName()).append("[type ") .append(device.getType()).append(", connection ").append(device.getConnection()).append("]: ").append(Platform.getNewline()); - GLProfile.glAvailabilityToString(device, sb, "\t", 1); + if( withAvailabilityInfo ) { + GLProfile.glAvailabilityToString(device, sb, "\t", 1); + } sb.append(Platform.getNewline()); - sb = getGLStrings(gl, sb, withCapabilitiesAndExtensionInfo); + sb = getGLStrings(gl, sb, withExtensionInfo); - if( withCapabilitiesAndExtensionInfo ) { + if( withCapabilitiesInfo ) { sb = getAllAvailableCapabilitiesInfo(device, sb); } return sb; -- cgit v1.2.3