diff options
author | Sven Gothel <[email protected]> | 2010-10-06 16:04:06 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-10-06 16:04:06 +0200 |
commit | 018c7e8660dc0af68bd129be9af5094d04d0b431 (patch) | |
tree | ac17156a48167f4a28e129adfc78b7c746aa6744 /src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java | |
parent | 03416ffe040d50b96573930104a78933605ae40d (diff) |
NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit test
NativeWindow/NativeSurface Refactoring
- Using NativeSurface interface
- NativeWindow extends NativeSurface, adds getLocationOnScreen(Point)
- NativeWindow add: getParent()
- NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must.
- NullWindow -> ProxySurface impl NativeSurface
- JOGL: Uses NativeSurface only.
- GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface()
Added mouseClick NEWT/AWT unit test
JOGL:
- GLAnimatorControl add: resetCounter()
-
NEWT:
- GLWindow counters: return GLWindow counters always
- WindowImpl
- requestFocus() wait until done
- reparent: readded requestFocusImpl(true),
native impl skips java focusAction if reparented
- X11Window: Add XRaiseWindow() in requestFocus()
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index c19871560..219d9f4dd 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2010 JogAmp Community. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -204,7 +205,7 @@ public abstract class GLContextImpl extends GLContext { if (contextHandle != 0) { int lockRes = drawable.lockSurface(); - if (NativeWindow.LOCK_SURFACE_NOT_READY == lockRes) { + if (NativeSurface.LOCK_SURFACE_NOT_READY == lockRes) { // this would be odd .. throw new GLException("Surface not ready to lock: "+drawable); } @@ -231,7 +232,7 @@ public abstract class GLContextImpl extends GLContext { } int lockRes = drawable.lockSurface(); - if (NativeWindow.LOCK_SURFACE_NOT_READY == lockRes) { + if (NativeSurface.LOCK_SURFACE_NOT_READY == lockRes) { // this would be odd .. throw new GLException("Surface not ready to lock"); } @@ -351,11 +352,11 @@ public abstract class GLContextImpl extends GLContext { boolean exceptionOccurred = false; int lockRes = drawable.lockSurface(); try { - if (NativeWindow.LOCK_SURFACE_NOT_READY == lockRes) { + if (NativeSurface.LOCK_SURFACE_NOT_READY == lockRes) { return CONTEXT_NOT_CURRENT; } try { - if (NativeWindow.LOCK_SURFACE_CHANGED == lockRes) { + if (NativeSurface.LOCK_SURFACE_CHANGED == lockRes) { drawable.updateHandle(); } if (0 == drawable.getHandle()) { @@ -452,7 +453,7 @@ public abstract class GLContextImpl extends GLContext { protected final long createContextARB(long share, boolean direct, int major[], int minor[], int ctp[]) { - AbstractGraphicsConfiguration config = drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration(); + AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration(); GLCapabilities glCaps = (GLCapabilities) config.getChosenCapabilities(); GLProfile glp = glCaps.getGLProfile(); |