From 2c6c5aa4c3e69a683a042a8bb7f83c4aca81152f Mon Sep 17 00:00:00 2001 From: Bill Kuker Date: Fri, 28 Sep 2012 12:48:13 +0000 Subject: [PATCH] Move 3d initialization back where it was (left crash detection). Feeling was that dismissing the splash screen so early in linux felt like a crash. --- core/ChangeLog | 4 +--- core/src/net/sf/openrocket/gui/figure3d/OpenGLUtils.java | 2 +- core/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java | 2 ++ core/src/net/sf/openrocket/startup/Startup2.java | 3 --- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/ChangeLog b/core/ChangeLog index 4fff51e05..944e4a914 100644 --- a/core/ChangeLog +++ b/core/ChangeLog @@ -1,8 +1,6 @@ -2012-09-27 Bill Kuker +2012-09-28 Bill Kuker * Added user preference to enable/disable 3D, and crash detection to disable 3D on a crash - - * Moved JOGL GL initialization earlier in initialization. 2012-09-25 Doug Pedrick diff --git a/core/src/net/sf/openrocket/gui/figure3d/OpenGLUtils.java b/core/src/net/sf/openrocket/gui/figure3d/OpenGLUtils.java index 221366c73..46e698ef6 100644 --- a/core/src/net/sf/openrocket/gui/figure3d/OpenGLUtils.java +++ b/core/src/net/sf/openrocket/gui/figure3d/OpenGLUtils.java @@ -30,7 +30,7 @@ public class OpenGLUtils { /** * Call this method as early as possible. */ - public static void earlyInitialize() { + public static void initialize() { // If crash detection fails this will allow someone to disable // the 3d preference from the command line. if (System.getProperty("openrocket.3d.disable") != null) { diff --git a/core/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java b/core/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java index 5175325f0..1a6063845 100644 --- a/core/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java +++ b/core/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java @@ -91,6 +91,8 @@ public class RocketFigure3d extends JPanel implements GLEventListener { this.configuration = config; this.setLayout(new BorderLayout()); + OpenGLUtils.initialize(); + //Only initizlize GL if 3d is enabled. if ( OpenGLUtils.is3dEnabled() ){ initGLCanvas(); diff --git a/core/src/net/sf/openrocket/startup/Startup2.java b/core/src/net/sf/openrocket/startup/Startup2.java index 1caa62626..82bc0d3c1 100644 --- a/core/src/net/sf/openrocket/startup/Startup2.java +++ b/core/src/net/sf/openrocket/startup/Startup2.java @@ -16,7 +16,6 @@ import net.sf.openrocket.communication.UpdateInfoRetriever; import net.sf.openrocket.database.ComponentPresetDatabase; import net.sf.openrocket.database.Databases; import net.sf.openrocket.gui.dialogs.UpdateInfoDialog; -import net.sf.openrocket.gui.figure3d.OpenGLUtils; import net.sf.openrocket.gui.main.BasicFrame; import net.sf.openrocket.gui.main.MRUDesignFile; import net.sf.openrocket.gui.main.Splash; @@ -61,8 +60,6 @@ public class Startup2 { OSXStartup.setupOSX(); } - OpenGLUtils.earlyInitialize(); - // Run the actual startup method in the EDT since it can use progress dialogs etc. log.info("Moving startup to EDT"); SwingUtilities.invokeAndWait(new Runnable() {