| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
CLASSPATH specific vars
Enable tests w/ and w/o AWT JARs ..
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
public class GLDrawableFactoryImpl.
Michael Weber's test case (commit e7388512b69979d00e5a213a1b166a1b1726ae0c)
pointed me to the flaw in GLDrawableFactory which exposed a non-public method,
ie. 'getOrCreateSharedContext()'.
This lead to the assumption, that the 'shared' drawable/context of the factory is multi purpose
and may be used for application context sharing - which is not the case.
Changed Michael's test case to use a local shared pbuffer based drawable/context
and made the method non-public, where it belongs.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
d644e9321dceeecdd94a1797e25e6e356d957c23)
Missed build-nativewindow.xml commit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
KeyListener handling (Bug 526)
NativeWindow:
- expose 'hasFocus()'
Window:
- 'protected enqueueRequestFocus(..)' -> 'public requestFocus(boolean wait)'
- New: 'setKeyboardFocusHandler(KeyListener)' allowing focus traversal co-op w/ covered TK (AWT)
WindowImpl:
- Impl Window changes (see above)
- Impl 'consumedTag' see commit 3b38957f36d4f89b85730755a41c00892ac70591
NewtCanvasAWT:
- FocusAction only removes the global AWT focus owner.
This fixes a deadlock on the Windows platform of AWT's native peer requestFocus impl,
since it's no more called at this point.
- NEW FocusTraversalKeyListener is set as the newtChild's KeyboardFocusHandler,
allowing traversal to the next/previous AWT component.
AWTParentWindowAdapter:
- focusGained(..) clears AWT focus and propagates focus to Newt child,
non blocking w/ 'requestFocus(false)' (see above)
KeyEvent:
- Document limitations of getKeyChar() (Bug 526)
MacWindow:
- only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526)
WindowsWindow:
- regenerate the keyCode for EVENT_KEY_TYPED (Bug 526)
X11Windows:
- complete keyCode mapping X11 -> Newt - X11KeySym2NewtVKey()
- only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526)
Tests:
- GearsES2: Make focus visible
- TestParentingFocusTraversal01AWT: unit test for keyboard focus traversal w/ NewtCanvasAWT
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instance ; Applet's on OS X are working
Generalize OffscreenLayerSurface
- Using new OffscreenLayerSurface allows using this functionality in a clean manner,
ie. no 'dirty' usage of MacOSXJAWTWindow in a JOGL GL class.
- 'Promoting' OffscreenLayerSurface functionality to JAWTWindow
and it's handling to GLDrawableFactoryImpl::createGLDrawable().
- Move MacOSXCGLDrawableFactory's "MacOSXJAWTWindow getLayeredSurfaceHost(NativeSurface surface)"
to NativeWindowFactory "OffscreenLayerSurface getOffscreenLayerSurface(NativeSurface surface, boolean ifEnabled)"
Use local JAWT instance
- Only w/ a local JAWT instance per JAWTWindow it is possible to switch between
offscreen-layer and onscreen. We also have to determing offscreen-layer lazy
at surface lock, since only at that time we have knowledge whether it's an Applet
or not.
+++
ContextUpdater:
Use local pthread mutex, add DEBUG output
JAWTWindow/NewtCanvasAWT:
Adding methods to request offscreen-layer-surface (if supported),
besides 'if applet' this may trigger the new functionality.
+++
Applet's on OS X are working:
- OS X 10.6.4
- Safari:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- OS X 10.7
- Safari:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attach/detach our GL one
- it seems to be more stable, having one root CALayer attached to the JAWT_SurfaceView forever
- tackles crach at GL layer destruction
- proper release of all GL layer resources
- now final [gl-layer dealloc] happens at very destruction of JAWT object,
even though it was removed from root-layer earlier (and all other references)
- see comment in MacOSXWindowSystemInterface-pbuffer.m :: createNSOpenGLLayer(..)
- at least no more crash .. and resource release ASAP, but the GL-layer itself (see above)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Better JAWT* name for offscreen layer surface:
- MacOSXCGLDrawableFactory, JAWTUtil, JAWTWindow, MacOSXJAWTWindow
- FIXME: Need to get rid of the cached JAWT instance,
in case we like to have dual usage of offscreenLayerSurface and onscreen.
This would be done implicit by using NEWT .. hence low prio.
AWTGraphicsConfiguration:
- Fix create(): Use capsRequested for AWT aligned caps if capsChosen is null.
(was capsChosen .. which is null)
- Add updateGraphicsConfiguration() which allows to update the AWTGraphicsConfiguration.
NewtFactoryAWT:
- Add updateGraphicsConfiguration() .. entrypoint for AWTGraphicsConfiguration.updateGraphicsConfiguration()
NSOpenGLLayer Impl:
- For 'some reason' the layer's position is initially negative, fix it @ 1st 'draw'
- Re-add CVDisplayLink OpenGL setting .. for what it's worth .. I don't know
JAWTWindow:
- Remove test setting: Only enable offscreenLayerSurface for applets if avail.
(New unit test enables it seperatly)
NewtCanvasAWT:
- If NEWT child is offscreen, attach AWTMouseAdapter and AWTKeyAdapter
to route these AWT input events to NEWT.
- Don't loose-focus if NEWT child is offscreen.
- Impl. NativeSurfaceHolder, NativeWindowHolder
- NativeWindow is created at construction
and it's GraphicsConfiguration updated at addNotify(..).
- At addNotify/reparent: try harder to determine proper NEWT child size:
- use preferred size if set
- use minimum size if set
- subtract insets from container size
OffscreenWindow/WindowImpl:
- Allow setSize() .. currently NOP for offscreen.
- WindowImpl: Commented out recreate case for offscreen-setSize ..
TEST: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01AWT
Passed tests:
- GLCanvas
- NewtCanvasAWT/OffscreenWindow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Undo 368cbf4462d7f3635c1ef4497424c360b5ccc203:
- "use SurfaceUpdateListener() to notify layer", simply use MacOSXCGLContext's swap impl.
MacOSXCGLContext:
- NSOpenGLImpl.create():
- issues createNSOpenGLLayer() using tex-size (maybe POT) as args
- attaches the NSOpenGLLayer to the JAWT layered surface host
- NSOpenGLImpl.setSwapInterval() propagates interval to our NSOpenGLLayer impl.
- NSOpenGLImpl.swapBuffer() (layer case):
- waits for v-sync if enabled (v-sync), or until native 'draw' is finished (tearing)
using our pthread/ NSOpenGLLayer synchronization.
The latter uses CADisplayLink or CVDisplayLinkRef for v-sync synchronization.
- flushes our local ctx
- triggers our NSOpenGLLayer to 'draw'
- MacOSXPbufferCGLContext create() sets the texture size independently of pbuffer size (POT/NPOT)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- attributes +NSOpenGLPFANoRecovery +NSOpenGLPFAAccelerated
- use SurfaceUpdateListener() to notify layer
- swapBufferImpl() adapt to 0038e2d41825c22bdd18a7b86a8229a3fab674a3
- pbuffer: don't enforce POT tex-size to surface size, but pbuffer only
- FIXME: Check POT pbuffer/tex-size for X11/Win32/.. !
-
|
|
|
|
|
|
|
|
|
|
| |
Cleanup
- use Platform OS_TYPE
- ..
JAWT* version flag
- if JAWTWindow is Applet, attempt offscreenLayer if avail
- ..
|
|
|
|
|
|
|
|
|
| |
- Use proper OSX types for NS/CGL prototypes (gluegen) and impl.
- Impl layeredSurface (native):
- OSXUtil: NSView backing creation
- OSXUtil: AttachJAWTSurfaceLayer
- CGL: NSOpenGLLayer type impl. and hook
|
|\ |
|
| | |
|
|/
|
|
| |
support.
|
| |
|
|
|
|
| |
usage and FBOMRT
|
| |
|
| |
|
|
|
|
| |
atomic.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
flags (-d32/-d64) ; glxext.h uses 'gl-64bit-types.h'
Cleanup dependencies and linker args
- JOGL/NEWT: remove Xxf86vm dependency
- NativeWindow Solaris: Use std 'Xinerama' and 'xf86vmode'
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for SWT access/calls
Adding OSXUtil: RunOnMainThread(), IsMainThread()
- Issuing a native call where the user Runnable is to be performed on the main thread
- Enable query if we are on the main thread.
Utilizing those for SWT access/calls
- Using the above to call all SWT functions on the main thread if required (incomplete)
TODO/Issues:
- JOGL OSX CGL Context fails, ie expecting NS, but having CGL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lifecycle deterministic; Remove warnings
Fix shared ctx release [onMainThread]
- Releasing the shared contexts caused a freeze of about 10s from one of the shared release operations.
[NSOpenGLContext release]
- Thorough triage concluded the workaround to release the shared ctx on the main thread.
- Using enhanced GLContextShareSet, see below
Make GLContextShareSet lifecycle deterministic
- Programmatically control the lifecycle of tracked shared ctx allows us using 'hard' references.
- Features queries for isShared() and ofc unregister a share set if all are destroyed.
Remove warnings
- MacOSXWindowSystemInterface.m used 'long', where 'GLint' was requested.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which only holds the 'update' state now.
Avoid calling updater() for every makeCurrent(), but if view's frame has changed only.
This solves the pixel flickering experienced on OSX.
- GLContextImpl:update() -> drawableUpdatedNotify() w/ comments
- ContextUpdater holds context, view, old view frame and the update state.
It doesn't issue NSOpenGLContext update() by itself, but allows querying and clearing the update flag.
- MacOSXOnscreenCGLContext impl drawableUpdatedNotify()
- register via ContextUpdater, and use it if available.
|
|
|
|
| |
cleanup in X11
|
|
|
|
| |
work)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
'-s 390adf8383'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Graph Shader Simplification
- remove enable factor and 2nd 'discard' branch
- use build-in 'max'/'clamp' functions, supposed to be faster
Graph Shader 'a'/'b' redefined
- 'a' is 1-pass shader only
- 'b' is 2-pass incl. (1st pass + 2nd pass)
- Works well on ARM Mali-400 MP (Galaxy S2).
- Doesn't work on NV tegra2 (P1202: Texture's gl states do not match with shader's),
however 2-pass on mobile seems to be overkill for now.
We may create a workaround (switch shader ..).
GraphUI 2-pass demo;
- Propagate renderModes and texSize to UIShape's render(..)
- TODO: Remove GL dependency in UIShape, maybe use a callback or visitor model
- Adding GarpUI 2-pass launcher (Android and Standalone)
|
| |
|
| |
|
| |
|