From 0da7eeff106c1a2bf9e730c504a09e38360f141e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 13 Feb 2012 23:17:56 +0100 Subject: Enhance ExtensionAvailabilityCache ; Expose extension count in GLContext (and clean up) - GLContext - Expose isFunctionAvailable(), isExtensionAvailable(), getPlatformExtensionCount(), getGLExtensionCount() - sort methods a bit ExtensionAvailabilityCache: - Favor StringBuilder instead of StringBuffer (faster) - Resuse set's - Hold dedicated counts of extensions, platform and GL --- .../classes/com/jogamp/opengl/JoglVersion.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java index bf7eb0770..40790e770 100644 --- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java +++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java @@ -123,29 +123,29 @@ public class JoglVersion extends JogampVersion { .append(device.getType()).append(", connection ").append(device.getConnection()).append("]: ").append(Platform.getNewline()); GLProfile.glAvailabilityToString(device, sb, "\t", 1); sb.append(Platform.getNewline()); - sb.append("Swap Interval ").append(gl.getSwapInterval()); + sb.append("Swap Interval ").append(gl.getSwapInterval()); sb.append(Platform.getNewline()); - sb.append("GL Profile ").append(gl.getGLProfile()); + sb.append("GL Profile ").append(gl.getGLProfile()); sb.append(Platform.getNewline()); - sb.append("CTX VERSION ").append(gl.getContext().getGLVersion()); + sb.append("CTX VERSION ").append(gl.getContext().getGLVersion()); sb.append(Platform.getNewline()); - sb.append("GL ").append(gl); + sb.append("GL ").append(gl); sb.append(Platform.getNewline()); - sb.append("GL_VENDOR ").append(gl.glGetString(GL.GL_VENDOR)); + sb.append("GL_VENDOR ").append(gl.glGetString(GL.GL_VENDOR)); sb.append(Platform.getNewline()); - sb.append("GL_RENDERER ").append(gl.glGetString(GL.GL_RENDERER)); + sb.append("GL_RENDERER ").append(gl.glGetString(GL.GL_RENDERER)); sb.append(Platform.getNewline()); - sb.append("GL_VERSION ").append(gl.glGetString(GL.GL_VERSION)); + sb.append("GL_VERSION ").append(gl.glGetString(GL.GL_VERSION)); sb.append(Platform.getNewline()); - sb.append("GL_EXTENSIONS "); + sb.append("GL_EXTENSIONS ").append(ctx.getGLExtensionCount()); sb.append(Platform.getNewline()); - sb.append(" ").append(ctx.getGLExtensionsString()); + sb.append(" ").append(ctx.getGLExtensionsString()); sb.append(Platform.getNewline()); - sb.append("GLX_EXTENSIONS"); + sb.append("GLX_EXTENSIONS ").append(ctx.getPlatformExtensionCount()); sb.append(Platform.getNewline()); - sb.append(" ").append(ctx.getPlatformExtensionsString()); + sb.append(" ").append(ctx.getPlatformExtensionsString()); sb.append(Platform.getNewline()); - sb.append("GLSL ").append(gl.hasGLSL()).append(", shader-compiler: ").append(gl.isFunctionAvailable("glCompileShader")); + sb.append("GLSL ").append(gl.hasGLSL()).append(", shader-compiler: ").append(gl.isFunctionAvailable("glCompileShader")); sb.append(Platform.getNewline()); sb.append(VersionUtil.SEPERATOR); -- cgit v1.2.3