Jogamp
EGLPBuffer: remove 'ownEGLDisplay=true' (just wrong), add destroyImpl()
authorSven Gothel <sgothel@jausoft.com>
Sun, 7 Aug 2011 05:57:07 +0000 (07:57 +0200)
committerSven Gothel <sgothel@jausoft.com>
Sun, 7 Aug 2011 05:57:07 +0000 (07:57 +0200)
src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java

index 6c4901d..1ec27c3 100644 (file)
@@ -155,7 +155,7 @@ public class EGLGLCapabilities extends GLCapabilities {
     if(null == sink) {
         sink = new StringBuffer();
     }
-    sink.append("0x").append(Long.toHexString(eglcfg)).append(", ");
+    // sink.append("0x").append(Long.toHexString(eglcfg)).append(", ");
     sink.append("0x").append(Long.toHexString(eglcfgid)).append(": ");
     super.toString(sink);
     sink.append(", [");
index b30089f..17f4d2b 100644 (file)
@@ -278,12 +278,10 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
         }
 
         // 26 
-
         attrs[idx++] = EGL.EGL_RENDERABLE_TYPE;
         if(caps.getGLProfile().usesNativeGLES1()) {
             attrs[idx++] = EGL.EGL_OPENGL_ES_BIT;
-        }
-        else if(caps.getGLProfile().usesNativeGLES2()) {
+        } else if(caps.getGLProfile().usesNativeGLES2()) {
             attrs[idx++] = EGL.EGL_OPENGL_ES2_BIT;
         } else {
             attrs[idx++] = EGL.EGL_OPENGL_BIT;
index 6cbd1ee..5fb32e6 100644 (file)
@@ -46,13 +46,14 @@ import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLException;
 
+import jogamp.opengl.x11.glx.GLX;
+
 public class EGLPbufferDrawable extends EGLDrawable {
     private int texFormat;
     protected static final boolean useTexture = false; // No yet ..
 
     protected EGLPbufferDrawable(EGLDrawableFactory factory, NativeSurface target) {
         super(factory, target);
-        ownEGLDisplay = true;
 
         // get choosen ones ..
         GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)
@@ -76,6 +77,10 @@ public class EGLPbufferDrawable extends EGLDrawable {
 
     }
 
+    protected void destroyImpl() {
+        setRealized(false);
+    }
+    
     protected long createSurface(long eglDpy, long eglNativeCfg, long surfaceHandle) {
         NativeSurface nw = getNativeSurface();
         int[] attrs = EGLGraphicsConfiguration.CreatePBufferSurfaceAttribList(nw.getWidth(), nw.getHeight(), texFormat);
http://JogAmp.org git info: FAQ, tutorial and man pages.