diff options
author | Sven Gothel <[email protected]> | 2013-01-27 14:08:07 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-01-27 14:08:07 +0100 |
commit | 2fe180fbee15b82e2ae14fe3c95887db246c874d (patch) | |
tree | 62664ce340fef807fd061b849aea5a46bba7b314 /src/nativewindow | |
parent | 3f4eeaf76efa8f1f8b305c8dc1770dc679ced307 (diff) |
Bug 665 (part 3) - Allow dis-association of GLContext's GLDrawable .. - Add EGL/ES2 tests, attempt to fix wrapped EGL case
- Bug 665 (part 2) was commit 7fd5f76e1eb4bbf93fe9b1171744bd755d8f96e4
- Add EGL/ES2 tests in
- TestGLContextDrawableSwitch01NEWT
- TestGLContextDrawableSwitch11NEWT
- Attempt to fix wrapped EGL case (incomplete)
- Using EGL/ES w/ non native EGL device/surface, but natively wrapped instances (most of the cases),
a 'complicated' delegation of
Native-Upstream -> EGL-Proxy -> EGL-Instance
is being used heavily relying on the objects lifecycle.
GLEventListenerState tries to roll back the realized state
and even sets the upstream device handle,
but this doesn't seem to be sufficient on X11.
Discussion:
It might turn out that we only can implement the survival of GLContext
and it's display device reliable w/ EGL within the GLAutoDrawable implementation,
which can hold the previous not destructed instances.
Diffstat (limited to 'src/nativewindow')
3 files changed, 5 insertions, 4 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java index a2af83359..2b49f6745 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java @@ -400,7 +400,7 @@ public class SWTAccessor { * @return */ public static AbstractGraphicsScreen getScreen(AbstractGraphicsDevice device, int screen) { - return NativeWindowFactory.createScreen(nwt, device, screen); + return NativeWindowFactory.createScreen(device, screen); } public static int getNativeVisualID(AbstractGraphicsDevice device, long windowHandle) { diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java index 27462ae70..a89caec76 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java @@ -56,7 +56,7 @@ public interface NativeSurface extends SurfaceUpdatedListener { * ie return a value other than {@link #LOCK_SURFACE_UNLOCKED} and {@link #LOCK_SURFACE_NOT_READY}, * which is * <pre> - * boolean ok = lockSurface() > LOCK_SURFACE_NOT_READY; + * boolean ok = LOCK_SURFACE_NOT_READY < lockSurface(); * </pre> * </p> * <p> diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index 07702c762..b6a052253 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -435,9 +435,10 @@ public abstract class NativeWindowFactory { /** * @param device * @param screen -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screen - * @return newly created AbstractGraphicsScreen of given native type + * @return newly created AbstractGraphicsScreen matching device's native type */ - public static AbstractGraphicsScreen createScreen(String type, AbstractGraphicsDevice device, int screen) { + public static AbstractGraphicsScreen createScreen(AbstractGraphicsDevice device, int screen) { + final String type = device.getType(); if( TYPE_X11 == type ) { final X11GraphicsDevice x11Device = (X11GraphicsDevice)device; if(0 > screen) { |