From 36dc4f5ab6957a4078842c488afb51df2fdc0630 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 26 Apr 2013 05:38:24 +0200 Subject: Simplify GLDrawableFactory's SharedResource Query Methods; Move WindowsWGLDrawableFactory Quirks to GLRendererQuirks (NeedCurrCtx4ARBPixFmtQueries, NeedCurrCtx4ARBCreateContext); Bug 706: Confine NeedCurrCtx4ARBCreateContext to [Windows, ATI, driver < 12.102.3); Avoid possible NPE @ GLContext.getGLVendorVersionNumber() - Simplify GLDrawableFactory's SharedResource Query Methods - Moving common methods to GLDrawableFactory/GLDrawableFactoryImpl while reusing common methods to SharedResourceRunner.Resource. - All factories SharedResources impl. SharedResourceRunner.Resource. - Move WindowsWGLDrawableFactory Quirks to GLRendererQuirks (NeedCurrCtx4ARBPixFmtQueries, NeedCurrCtx4ARBCreateContext) - For better maintenance, move the mentioned quirks from the windows factory to our common place, being detected within GLContextImpl after each context creation. - Bug 706: Confine NeedCurrCtx4ARBCreateContext to [Windows, ATI, driver < 12.102.3) - Before we added this quirk if [Windows, ATI], however, we have hopes that the new drivers will suffice for all as tested successful on my test machine (AMD Radeon HD 6300M Series, amd_catalyst_13.5_mobility_beta2). - Avoid possible NPE @ GLContext.getGLVendorVersionNumber() - GLContext.getGLVendorVersionNumber() never returns 'null' but a zero version instance instead! - Add API doc. - Use mixed case names in GLContextImpl.setRendererQuirks(..). --- .../com/jogamp/opengl/GLRendererQuirks.java | 48 +++++++- src/jogl/classes/javax/media/opengl/GLContext.java | 15 ++- .../javax/media/opengl/GLDrawableFactory.java | 9 +- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 82 +++++++++---- .../jogamp/opengl/GLDrawableFactoryImpl.java | 61 +++++++--- .../classes/jogamp/opengl/GLVersionNumber.java | 7 +- .../jogamp/opengl/SharedResourceRunner.java | 4 + .../jogamp/opengl/egl/EGLDrawableFactory.java | 84 +++++--------- .../egl/EGLGraphicsConfigurationFactory.java | 2 +- .../macosx/cgl/MacOSXCGLDrawableFactory.java | 87 ++++++-------- .../macosx/cgl/MacOSXCGLGraphicsConfiguration.java | 2 +- .../macosx/cgl/MacOSXPbufferCGLDrawable.java | 2 +- .../windows/wgl/WindowsPbufferWGLDrawable.java | 2 +- .../opengl/windows/wgl/WindowsWGLContext.java | 6 +- .../windows/wgl/WindowsWGLDrawableFactory.java | 129 ++++----------------- .../wgl/WindowsWGLGraphicsConfiguration.java | 3 +- .../WindowsWGLGraphicsConfigurationFactory.java | 21 ++-- .../jogamp/opengl/x11/glx/X11GLXContext.java | 2 +- .../opengl/x11/glx/X11GLXDrawableFactory.java | 47 ++------ .../glx/X11GLXGraphicsConfigurationFactory.java | 2 +- 20 files changed, 296 insertions(+), 319 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java index 4c068414c..01d2b30a0 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java +++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java @@ -34,6 +34,10 @@ package com.jogamp.opengl; * Using centralized quirk identifier enables us to * locate code dealing w/ it and hence eases it's maintenance. *

+ *

+ * Some GL_VENDOR and GL_RENDERER strings are + * listed here . + *

*/ public class GLRendererQuirks { /** @@ -92,7 +96,7 @@ public class GLRendererQuirks { * Drivers known exposing such bug: *