summaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
index dca05dd18..320c0ec75 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
@@ -80,6 +80,18 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
this.eglLifecycleCallback = null;
}
+ public EGLGraphicsDevice(final AbstractGraphicsDevice aDevice, final long eglDisplay, final EGLDisplayLifecycleCallback eglLifecycleCallback) {
+ super(NativeWindowFactory.TYPE_EGL, aDevice.getConnection(), aDevice.getUnitID(), eglDisplay);
+ final long nativeDisplayID;
+ if( aDevice instanceof EGLGraphicsDevice ) {
+ nativeDisplayID = ((EGLGraphicsDevice)aDevice).getNativeDisplayID();
+ } else {
+ nativeDisplayID = aDevice.getHandle();
+ }
+ this.nativeDisplayID[0] = nativeDisplayID;
+ this.eglLifecycleCallback = eglLifecycleCallback;
+ }
+
public EGLGraphicsDevice(final long nativeDisplayID, final long eglDisplay, final String connection, final int unitID, final EGLDisplayLifecycleCallback eglLifecycleCallback) {
super(NativeWindowFactory.TYPE_EGL, connection, unitID, eglDisplay);
this.nativeDisplayID[0] = nativeDisplayID;