diff options
author | Sven Gothel <[email protected]> | 2008-05-30 14:37:54 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-05-30 14:37:54 +0000 |
commit | 31d1dd9cd0b0d1b5a0dd7ac61dfe88ee214364a8 (patch) | |
tree | f1b09269a38e952f552a57ef3dca14939297fe86 | |
parent | acdd8ef2e4af64871c62b8b9b84af83a32fd1aba (diff) |
EGLDrawableFactory: Removed shutdown.
GLDrawable: Added 'destroy' to interface.
EGLDrawable: Implemented 'destroy',
to setRealized(false) and
to shutdown the egl/display connection (eglTerminate).
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1653 232f8b59-042b-4e1e-8c03-345bb8c30851
-rwxr-xr-x | src/classes/com/sun/opengl/impl/egl/EGLDrawable.java | 5 | ||||
-rw-r--r-- | src/classes/javax/media/opengl/GLDrawable.java | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java index 22b39e291..8ac790157 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -88,7 +88,8 @@ public class EGLDrawable implements GLDrawable { return display; } - public void shutdown() { + public void destroy() { + setRealized(false); EGL.eglTerminate(display); } @@ -111,7 +112,7 @@ public class EGLDrawable implements GLDrawable { if (surface == EGL.EGL_NO_SURFACE) { throw new GLException("Creation of window surface (eglCreateWindowSurface) failed"); } - } else { + } else if( surface != EGL.EGL_NO_SURFACE ) { // Destroy the window surface // FIXME: we should expose a destroy() method on // GLDrawable and get rid of setRealized(), instead diff --git a/src/classes/javax/media/opengl/GLDrawable.java b/src/classes/javax/media/opengl/GLDrawable.java index 6c0178474..d57ddc0ee 100644 --- a/src/classes/javax/media/opengl/GLDrawable.java +++ b/src/classes/javax/media/opengl/GLDrawable.java @@ -103,6 +103,13 @@ public interface GLDrawable { */ public void setRealized(boolean realized); + /** + * Cleanup the complete association to the native Canvas's display, + * and releases all ressources. + * This implies a call to <code>setRealized(false)</code> + */ + public void destroy(); + /** Requests a new width and height for this GLDrawable. Not all drawables are able to respond to this request and may silently ignore it. */ |