summaryrefslogtreecommitdiffstats
path: root/src/classes/share/com/sun/j3d
diff options
context:
space:
mode:
authorKevin Rushforth <[email protected]>2006-12-01 01:00:02 +0000
committerKevin Rushforth <[email protected]>2006-12-01 01:00:02 +0000
commit9a18a3b5499643bc4a33c3920c25b87689a5eb0c (patch)
tree125195d5e2b1a2269f6269cd2e956c4bdaa83aaa /src/classes/share/com/sun/j3d
parenta8cb2fc8a264b00ff0ca5eec272008384d72be5a (diff)
Fixed issue 395: JCanvas3D / JOGL: Program freezes
git-svn-id: https://svn.java.net/svn/j3d-core-utils~svn/trunk@142 9497e636-51bd-65ba-982d-a4982e1767a5
Diffstat (limited to 'src/classes/share/com/sun/j3d')
-rw-r--r--src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java b/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java
index 7189694..6662e80 100644
--- a/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java
+++ b/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java
@@ -126,6 +126,9 @@ public class JCanvas3D extends JPanel implements AncestorListener {
/** the template to be used for this canvas */
private GraphicsConfigTemplate3D template;
+
+ /** the graphics configuration used for this canvas */
+ private GraphicsConfiguration graphicsConfig;
/** The canvas that is linked to the component. */
InternalCanvas3D canvas;
@@ -219,6 +222,8 @@ public class JCanvas3D extends JPanel implements AncestorListener {
this.template.setStereo(GraphicsConfigTemplate.UNNECESSARY);
this.template.setDoubleBuffer(GraphicsConfigTemplate.UNNECESSARY);
+ graphicsConfig = this.device.getBestConfiguration(this.template);
+
addAncestorListener(this);
setDoubleBuffered(false);
setResizeMode(RESIZE_IMMEDIATELY);
@@ -310,8 +315,7 @@ public class JCanvas3D extends JPanel implements AncestorListener {
}
} else {
// no canvas, i have to create it.
- canvas = new InternalCanvas3D(device.getBestConfiguration(
- this.template), this);
+ canvas = new InternalCanvas3D(this.graphicsConfig, this);
}
createOffScreenBuffer(width, height); // whatever happened right above, i need to create the offscreen buffer.