aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-03 07:16:56 +0100
committerSven Gothel <[email protected]>2010-11-03 07:16:56 +0100
commit034cab60ee08f0a5ee175b6ad81a188b35d7f301 (patch)
treee74c306a51ba24e635f41113778999929db92191 /src/jogl/classes/com/jogamp/opengl/impl/windows/wgl
parent2b24c35472c0cb570674833ea1626df47fb0d721 (diff)
JOGL DrawableFactory/AWT: Only use AWT factory if AWT is enabled
.. and a little cleanup in the X11 SharedResourceRunner
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/windows/wgl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index f59fb78c9..cea176b1f 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -79,10 +79,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
// Register our GraphicsConfigurationFactory implementations
// The act of constructing them causes them to be registered
new WindowsWGLGraphicsConfigurationFactory();
- try {
- ReflectionUtil.createInstance("com.jogamp.opengl.impl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory",
- null, getClass().getClassLoader());
- } catch (JogampRuntimeException jre) { /* n/a .. */ }
+ if(GLProfile.isAWTAvailable()) {
+ try {
+ ReflectionUtil.createInstance("com.jogamp.opengl.impl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory",
+ null, getClass().getClassLoader());
+ } catch (JogampRuntimeException jre) { /* n/a .. */ }
+ }
NativeWindowFactory.getDefaultToolkitLock().lock(); // OK
try {