From dd0400a41478c1f365414b8c760eee1c91105280 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Wed, 2 Jun 2010 04:04:19 +0200
Subject: JOGL: Unified GLContext native handle

- All GLContext implementations are using the contextHandle of the super class.
- GLContext.getHandle() exposes contextHandle for API cross access
---
 .../classes/com/jogamp/opengl/impl/egl/EGLExternalContext.java    | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'src/jogl/classes/com/jogamp/opengl/impl/egl/EGLExternalContext.java')

diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLExternalContext.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLExternalContext.java
index b289aa9ce..f5f027f94 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLExternalContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLExternalContext.java
@@ -41,7 +41,6 @@ import javax.media.nativewindow.*;
 
 public class EGLExternalContext extends EGLContext {
     private boolean firstMakeCurrent = true;
-    private boolean created = true;
     private GLContext lastContext;
 
     public EGLExternalContext(AbstractGraphicsScreen screen) {
@@ -71,6 +70,7 @@ public class EGLExternalContext extends EGLContext {
     protected int makeCurrentImpl() throws GLException {
         if (firstMakeCurrent) {
             firstMakeCurrent = false;
+            // FIXME: set contextHandle
             return CONTEXT_CURRENT_NEW;
         }
         return CONTEXT_CURRENT;
@@ -80,14 +80,10 @@ public class EGLExternalContext extends EGLContext {
     }
 
     protected void destroyImpl() throws GLException {
-        created = false;
+        contextHandle = 0 ;
         GLContextShareSet.contextDestroyed(this);
     }
 
-    public boolean isCreated() {
-        return created;
-    }
-
     public void bindPbufferToTexture() {
         throw new GLException("Should not call this");
     }
-- 
cgit v1.2.3