aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-03-03 21:34:02 +0000
committerKenneth Russel <[email protected]>2006-03-03 21:34:02 +0000
commit25ba92c62f752884dde5cb59feaa71d6003da80b (patch)
treeb3dfea38bddb709fae71acaf20fccd6165394310 /src
parentfe961cf21b4589e95adde102d4d845f4304fa41b (diff)
Fixed new bug associated with GLObjectTracker and context destruction
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@645 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rw-r--r--src/classes/javax/media/opengl/GLJPanel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/GLJPanel.java b/src/classes/javax/media/opengl/GLJPanel.java
index 445ea3c4d..8d9b3c851 100644
--- a/src/classes/javax/media/opengl/GLJPanel.java
+++ b/src/classes/javax/media/opengl/GLJPanel.java
@@ -506,10 +506,13 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
if (curSurface != null) {
if (j2dSurface != curSurface) {
if (joglContext != null) {
+ // Note that the following operation may make the
+ // joglContext current briefly
joglContext.destroy();
joglContext = null;
joglDrawable = null;
sendReshape = true;
+ j2dContext.makeCurrent();
if (DEBUG) {
System.err.println("Sending reshape because surface changed");
System.err.println("New surface = " + curSurface);