Update of /cvsroot/jake2/jake2/src/jake2/render/opengl
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv29304/src/jake2/render/opengl
Modified Files:
Jsr231Driver.java
Log Message:
destroy gl context in the canvas removeNotify
Index: Jsr231Driver.java
===================================================================
RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Jsr231Driver.java 11 Dec 2006 15:54:41 -0000 1.16
--- Jsr231Driver.java 11 Dec 2006 16:38:09 -0000 1.17
***************
*** 54,58 ****
private DisplayMode oldDisplayMode;
private Display display;
! Frame window;
// window position on the screen
--- 54,58 ----
private DisplayMode oldDisplayMode;
private Display display;
! private volatile Frame window;
// window position on the screen
***************
*** 248,252 ****
}
if (window != null) {
- display.destroy();
window.dispose();
}
--- 248,251 ----
***************
*** 350,353 ****
--- 349,354 ----
public void removeNotify() {
+ release();
+ context.destroy();
drawable.setRealized(false);
super.removeNotify();
***************
*** 369,378 ****
}
- void destroy() {
- release();
- context.destroy();
- drawable.setRealized(false);
- }
-
private static GraphicsConfiguration unwrap(AWTGraphicsConfiguration config) {
if (config == null) {
--- 370,373 ----
|