aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index f7377a648..e145a959c 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -471,10 +471,17 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
AbstractGraphicsConfiguration aConfig = surface.getGraphicsConfiguration();
AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
if( aDevice instanceof EGLGraphicsDevice && aConfig instanceof EGLGraphicsConfiguration ) {
+ if(surface instanceof WrappedSurface) {
+ // already wrapped surface - no wrapped recursion
+ if(DEBUG) {
+ System.err.println(getThreadName() + ": getEGLSurface - already wrapped surface - use as-is: "+surface);
+ }
+ return surface;
+ }
if(EGLDrawable.isValidEGLSurface((EGLGraphicsDevice)aDevice, surface)) {
// already in native EGL format
if(DEBUG) {
- System.err.println(getThreadName() + ": getEGLSurface - already valid EGL surface - use as-is: "+aConfig);
+ System.err.println(getThreadName() + ": getEGLSurface - already valid EGL surface - use as-is: "+surface);
}
return surface;
}