From 33a2605d37ec590b8a7fd37a708f8159cb9bd487 Mon Sep 17 00:00:00 2001 From: Dan Krisher Date: Thu, 3 Feb 2011 00:59:55 +0800 Subject: Move GLCanvas' static initialization of default GLProfile into constructor to avoid requiring native libraries at class initialization time. --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/jogl/classes/javax') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index acabe58a5..75b9ec375 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -138,11 +138,9 @@ import com.jogamp.opengl.impl.ThreadingImpl; public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosingProtocol { private static final boolean DEBUG; - private static final GLProfile defaultGLProfile; static { DEBUG = Debug.debug("GLCanvas"); - defaultGLProfile = GLProfile.getDefault(GLProfile.getDefaultDesktopDevice()); } private GLDrawableHelper drawableHelper = new GLDrawableHelper(); @@ -220,7 +218,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing super(); if(null==capsReqUser) { - capsReqUser = new GLCapabilities(defaultGLProfile); + capsReqUser = new GLCapabilities(GLProfile.getDefault(GLProfile.getDefaultDesktopDevice())); } else { // don't allow the user to change data capsReqUser = (GLCapabilitiesImmutable) capsReqUser.cloneMutable(); -- cgit v1.2.3