From 75b7379caf263a8e44a21c2daf1fc994f4761dc8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 7 Aug 2011 07:57:07 +0200 Subject: EGLPBuffer: remove 'ownEGLDisplay=true' (just wrong), add destroyImpl() --- src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java | 2 +- src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java | 4 +--- src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java | 7 ++++++- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java index 6c4901de8..1ec27c36c 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java @@ -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(", ["); diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java index b30089faa..17f4d2b2e 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java @@ -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; diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java index 6cbd1ee6a..5fb32e6cd 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java @@ -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); -- cgit v1.2.3