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.

This commit is contained in:
Bill Kuker 2012-09-28 12:48:13 +00:00
parent 1733ae5398
commit 2c6c5aa4c3
4 changed files with 4 additions and 7 deletions

View File

@ -1,9 +1,7 @@
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 * 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 2012-09-25 Doug Pedrick
* Added preference to open last edited design file upon startup. * Added preference to open last edited design file upon startup.

View File

@ -30,7 +30,7 @@ public class OpenGLUtils {
/** /**
* Call this method as early as possible. * 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 // If crash detection fails this will allow someone to disable
// the 3d preference from the command line. // the 3d preference from the command line.
if (System.getProperty("openrocket.3d.disable") != null) { if (System.getProperty("openrocket.3d.disable") != null) {

View File

@ -91,6 +91,8 @@ public class RocketFigure3d extends JPanel implements GLEventListener {
this.configuration = config; this.configuration = config;
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
OpenGLUtils.initialize();
//Only initizlize GL if 3d is enabled. //Only initizlize GL if 3d is enabled.
if ( OpenGLUtils.is3dEnabled() ){ if ( OpenGLUtils.is3dEnabled() ){
initGLCanvas(); initGLCanvas();

View File

@ -16,7 +16,6 @@ import net.sf.openrocket.communication.UpdateInfoRetriever;
import net.sf.openrocket.database.ComponentPresetDatabase; import net.sf.openrocket.database.ComponentPresetDatabase;
import net.sf.openrocket.database.Databases; import net.sf.openrocket.database.Databases;
import net.sf.openrocket.gui.dialogs.UpdateInfoDialog; 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.BasicFrame;
import net.sf.openrocket.gui.main.MRUDesignFile; import net.sf.openrocket.gui.main.MRUDesignFile;
import net.sf.openrocket.gui.main.Splash; import net.sf.openrocket.gui.main.Splash;
@ -61,8 +60,6 @@ public class Startup2 {
OSXStartup.setupOSX(); OSXStartup.setupOSX();
} }
OpenGLUtils.earlyInitialize();
// Run the actual startup method in the EDT since it can use progress dialogs etc. // Run the actual startup method in the EDT since it can use progress dialogs etc.
log.info("Moving startup to EDT"); log.info("Moving startup to EDT");
SwingUtilities.invokeAndWait(new Runnable() { SwingUtilities.invokeAndWait(new Runnable() {