summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-23 08:35:24 +0100
committerSven Gothel <[email protected]>2011-11-23 08:35:24 +0100
commit3bc1ef8344ad44969ef436a0b98b0cde490a78fa (patch)
tree10cb50e574ea28fe8afccde8c1ecda8b67f5eb03 /src/jogl/classes/jogamp/opengl/x11/glx
parentbafd9b99816f55c105230a59211caf13f0315910 (diff)
GraphicsConfigurationFactory: Kick off 'registerFactory' via static method instead of constructor for clarity.
- prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java6
3 files changed, 11 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index 63b2cff35..2147287ba 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -87,11 +87,11 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
super();
// Register our GraphicsConfigurationFactory implementations
// The act of constructing them causes them to be registered
- new X11GLXGraphicsConfigurationFactory();
+ X11GLXGraphicsConfigurationFactory.registerFactory();
if(GLProfile.isAWTAvailable()) {
try {
- ReflectionUtil.createInstance("jogamp.opengl.x11.glx.awt.X11AWTGLXGraphicsConfigurationFactory",
- null, getClass().getClassLoader());
+ ReflectionUtil.callStaticMethod("jogamp.opengl.x11.glx.awt.X11AWTGLXGraphicsConfigurationFactory",
+ "registerFactory", null, null, getClass().getClassLoader());
} catch (JogampRuntimeException jre) { /* n/a .. */ }
}
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 0f8b94825..126efad8d 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -71,8 +71,10 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
protected static final boolean DEBUG = Debug.debug("GraphicsConfiguration");
static X11GLCapabilities.XVisualIDComparator XVisualIDComparator = new X11GLCapabilities.XVisualIDComparator();
- X11GLXGraphicsConfigurationFactory() {
- GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.x11.X11GraphicsDevice.class, this);
+ static void registerFactory() {
+ GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.x11.X11GraphicsDevice.class, new X11GLXGraphicsConfigurationFactory());
+ }
+ private X11GLXGraphicsConfigurationFactory() {
}
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
index 9ee20d8ea..5ecbba505 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
@@ -47,8 +47,10 @@ import jogamp.nativewindow.x11.*;
public class X11AWTGLXGraphicsConfigurationFactory extends GLGraphicsConfigurationFactory {
protected static final boolean DEBUG = Debug.debug("GraphicsConfiguration");
- public X11AWTGLXGraphicsConfigurationFactory() {
- GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.awt.AWTGraphicsDevice.class, this);
+ public static void registerFactory() {
+ GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.awt.AWTGraphicsDevice.class, new X11AWTGLXGraphicsConfigurationFactory());
+ }
+ private X11AWTGLXGraphicsConfigurationFactory() {
}
protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(