- Remove GL Late-initialization. GL is now set up when RocketFigure3d is constructed. This fixes a crash / hang on Java 7.
- Splash Screen must now be closed sooner. RocketFigure3d performs this task. This fixes a crash on Linux / X11. - Check for "-Dopenrocket.3d.disable" and do no GL setup at all if this is defined. If users find GL cause OpenRocket to crash they may specify this option and use OR (Without 3d!)
This commit is contained in:
parent
d70cc32dd6
commit
0fd4ada18d
@ -1,3 +1,9 @@
|
|||||||
|
2012-08-28 Bill Kuker
|
||||||
|
|
||||||
|
* Removed late GL initialization, was causing issues with Java 7.
|
||||||
|
|
||||||
|
* Added -Dopenrocket.3d.disable option for anyone experiencing crashes as a result of OpenGL.
|
||||||
|
|
||||||
2012-08-01 Kevin Ruland
|
2012-08-01 Kevin Ruland
|
||||||
|
|
||||||
* Changed the loader to pull *.rkt files from zip containers.
|
* Changed the loader to pull *.rkt files from zip containers.
|
||||||
|
@ -9,7 +9,8 @@ openrocket.locale
|
|||||||
Select the default locale to be used, for example "en_US".
|
Select the default locale to be used, for example "en_US".
|
||||||
If set to "xx", the logical keys will be displayed instead of the translated strings.
|
If set to "xx", the logical keys will be displayed instead of the translated strings.
|
||||||
|
|
||||||
|
openrocket.3d.disable
|
||||||
|
Disables all OpenGL calls if set.
|
||||||
|
|
||||||
Logging options
|
Logging options
|
||||||
---------------
|
---------------
|
||||||
|
@ -6,8 +6,7 @@ import java.awt.Graphics2D;
|
|||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.RenderingHints;
|
import java.awt.RenderingHints;
|
||||||
import java.awt.event.HierarchyEvent;
|
import java.awt.SplashScreen;
|
||||||
import java.awt.event.HierarchyListener;
|
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
@ -87,19 +86,24 @@ public class RocketFigure3d extends JPanel implements GLEventListener {
|
|||||||
this.configuration = config;
|
this.configuration = config;
|
||||||
this.setLayout(new BorderLayout());
|
this.setLayout(new BorderLayout());
|
||||||
|
|
||||||
/**
|
//Only initizlize GL if 3d is enabled.
|
||||||
* This achieves late GL initialization, so that if there is a crash
|
if ( is3dEnabled() ){
|
||||||
* it does not occur until user selects 3D view, so as to not render
|
//Fixes a linux / X bug: Splash must be closed before GL Init
|
||||||
* the application unusable.
|
SplashScreen splash = SplashScreen.getSplashScreen();
|
||||||
*/
|
if ( splash != null )
|
||||||
addHierarchyListener(new HierarchyListener() {
|
splash.close();
|
||||||
@Override
|
|
||||||
public void hierarchyChanged(HierarchyEvent e) {
|
|
||||||
log.verbose("GL - Calling initGLCanvas on hierarchy change");
|
|
||||||
initGLCanvas();
|
initGLCanvas();
|
||||||
RocketFigure3d.this.removeHierarchyListener(this);
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if 3d view is enabled. This may be toggled by the user at
|
||||||
|
* launch time.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean is3dEnabled(){
|
||||||
|
return System.getProperty("openrocket.3d.disable") == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initGLCanvas(){
|
private void initGLCanvas(){
|
||||||
|
@ -285,9 +285,9 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
bg.add(toggle3d);
|
bg.add(toggle3d);
|
||||||
|
toggle3d.setEnabled(RocketFigure3d.is3dEnabled());
|
||||||
add(toggle3d, "gap rel");
|
add(toggle3d, "gap rel");
|
||||||
|
|
||||||
|
|
||||||
// Zoom level selector
|
// Zoom level selector
|
||||||
scaleSelector = new ScaleSelector(scrollPane);
|
scaleSelector = new ScaleSelector(scrollPane);
|
||||||
add(scaleSelector);
|
add(scaleSelector);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user