aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Animator: Limit wait for condition in finishLifecycleAction() via timeoutSven Gothel2011-11-101-4/+9
| | | | | | | | | | | | While impl. recreation for offscreen surfaces @ WindowImpl.setSize(), commit 51ad6992e068f25d86d2c9e085bd7ec6f49d2432, it appears Animator deadlocks in some cases. finishLifecycleAction() [blocks until pause() .. is accomplished] queries whether we are even able to wait using skipWaitForCompletion(). The latter method can only query if we are on the animation thread or AWT-EDT, etc, but not if we have traversed through a 3rd party thread, eg NEWT EDT. This patches limits the wait with a timeout of 20frames @ 60Hz (20*16ms).
* NEWT/WindowImpl: Generalize recreation @ setSize() for offscreen surfaceSven Gothel2011-11-101-53/+54
| | | | | In case of offscreen surfaces (pbuffer, ..) we have to go through a whole destroy/setSize/create cycle.
* MacOSXPbufferCGLDrawable: verbose debug messagesSven Gothel2011-11-101-1/+2
|
* Fix MacOSXJAWTWindow: Impl. SurfaceChangeable ; Proper invalidateNative()Sven Gothel2011-11-102-11/+38
| | | | | | | | | | Impl. SurfaceChangeable (regression 8f5465396fe429ce6b7ecae808416691271c7867) - offscreenSurfaceLayer code requires instanceof SurfaceChangeable - overwrite JAWTWindow size getter: use surfaceSizeChanged() values if used. Proper invalidateNative() - detach JAWTSurfaceLayer if set - destroy dummy NSWindow (was typo)
* Fix regression JAWTWindow/AWTGraphicsConfiguration ↵Sven Gothel2011-11-102-1/+21
| | | | | | | | | | | updateGraphicsConfiguration() of commit 46542168d64b37f544f61802693f15b59b224e4e While introducing NewtCanvasAWT's lifetime reference of (JAWTWindow) nativeWindow using updateGraphicsConfiguration() to determine the actual config values at addNotify(), it was overseen that the AWTGraphicsDevice needs to be re-validated. JAWTWindow's validateNative() ensures that the AWTGraphicsDevice reflects the platform native handle where required (X11).
* NativeWindow minor edits: Remove warnings (generics, imports, ..)Sven Gothel2011-11-104-26/+30
|
* NewtCanvasAWT: nativeWindow field lifecycle is same as holder (Composition). ↵Sven Gothel2011-11-091-1/+0
| | | | (regression from commit 46542168d64b37f544f61802693f15b59b224e4e)
* NewtCanvasAWT: Fix NPE (regression from commit ↵Sven Gothel2011-11-091-2/+4
| | | | 46542168d64b37f544f61802693f15b59b224e4e)
* NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-0916-19/+24
| | | | | | | | | | | | conflicts with setSize() This fixes the NEWT OffscreenWindow conflict w/ setSize() which represents the action of changing the window's size. SurfaceChangeable's surfaceSizeChanged() merily notifies the actual size. JAWTWindow: Remove setSize() since it propagates the surface size upstream only. MacOSXJAWTWindow is not SurfaceChangeable complete (no surfaceSizeChanged).
* test: minor editSven Gothel2011-11-091-0/+1
|
* Cleanup offscreen/pbuffer drawables - minor editsSven Gothel2011-11-096-46/+28
|
* Fix TestParenting03AWT: NewtCanvasAWT has always a NativeWindowSven Gothel2011-11-091-28/+28
| | | | - Also make layout nice ..
* minor editSven Gothel2011-11-091-1/+1
|
* Fix regression: setScreen(..) invalid ref count & flagSven Gothel2011-11-091-25/+6
| | | | | | Undo parts of commits in this regard: - 46542168d64b37f544f61802693f15b59b224e4e: move method back to ReparentAction - f51e3dad6c4bd1f6d0001cecf6a0f692400ed602: remove added ref counter / flag
* OS X Layered View: Part5 NEWT/AWT Interaction ; Fix NSOpenGLLayer pos ; CleanupSven Gothel2011-11-0916-118/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* OS X Layered View: Part4 NEWT OffscreenWindow/WindowImpl fixSven Gothel2011-11-092-9/+24
| | | | | | | | | | | | | | | | | | | WindowImpl: - Impl. NativeSurfaceHolder/NativeWindowHolder 'hooks' - setScreen() utilize proper screen reference count/destruction: - set 'screenReferenceAdded=true' and incr. ref-count, hence next destroy() properly decr. ref-count (may destuct screen). OffscreenWindow: - Allow parent window handle (simply ignore it) Otherwise we could not use OffscreenWindow for parenting tests. - Fix setSize() propaget if !isNativeValid() instead of !isVisible(), otherwise lazy initialization doesn't work. - Allow reconfigureWindowImpl() to pass flags other than visible, simply ignore them.
* OS X Layered View: Part3 JAWTWindow/MacOSXJAWTWindow (Java/Native)Sven Gothel2011-11-094-23/+133
| | | | | | | | | | | | | | | | JAWTWindow: - Add comment about caller of cstr, since it uses reflection - Field 'config' is of type AWTGraphicsConfiguration, validate and type it - Impl. NativeSurfaceHolder/NativeWindowHolder 'hooks' MacOSXJAWTWindow: - Use agnostic JAWTUtil.isJAWTVersionUsingOffscreenLayer() to determine 'isOffscreenLayeredSurface'. We may promote this notion to JAWTWindow, which already holds 'isApplet' - lockSurface() case 'isOffscreenLayeredSurface': - Create dummy NSWindow (OSXUtil) for getWindowHandle() - Fix chosen caps: offscreen
* Minor edits: remove redundanciesSven Gothel2011-11-0911-15/+12
|
* NativeWindow: Add accessor interfaces NativeSurfaceHolder and NativeWindowHolderSven Gothel2011-11-098-6/+115
| | | | | | | | | | | | | | | | | - NativeSurfaceHolder interface allows access to it's implementation's NativeSurface reference. - NativeWindowHolder interface allows access to it's implementation's NativeWindow reference. Implement or extend interface w/ these accessors whereever it seems fit: - NEWT Window - GLDrawable These accessors allow lower layers to retrieve the NativeSurface/Window instance w/o knowledge of the 'upper' frameworks, ie. NativeWindow/JOGL or JOGL/NEWT. Commited in followups (due to mixed semantical changes in those files): - JAWTWindow - NewtCanvasAWT - Some NEWT impl.
* OS X Layered View: Part2 Java/Native MacOSXCGLContext / MacOSXPbufferCGLContextSven Gothel2011-11-094-83/+329
| | | | | | | | | | | | | | | | | | | | | | | 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)
* Minor edits: Remove unused code and warningsSven Gothel2011-11-082-14/+3
|
* FPSCounter: Use Java 1.5 TimeUnitSven Gothel2011-11-081-2/+4
|
* GLContext: Intendation + Use generics (remove warnings)Sven Gothel2011-11-081-22/+27
|
* OSX: SharedResource add knowledge of NPOT-, RECT- and Float-Texture ↵Sven Gothel2011-11-084-98/+132
| | | | | | features, used by pbuffer drawable before a current context. - Also extract getNextPowerOf2() -> GLBuffers (remove redundancy)
* JOGL: GLBase Add 'isNPOTTextureAvailable()' for convenienceSven Gothel2011-11-083-3/+17
|
* JOGL: Add 'struct timespec' (POSIX) utils for native time handlingSven Gothel2011-11-083-0/+86
|
* OS X Layered View: Use pbuffer method (pbuffer w/ dbl buffer)Sven Gothel2011-11-0614-227/+454
| | | | | | | | | - 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/.. ! -
* JOGL *Drawable swapBufferImpl() cleanup: Don't force swap-buffer off for ↵Sven Gothel2011-11-0613-95/+27
| | | | offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
* JOGL/Offscreen-Drawable: Use setRealized(boolean) protocol for offscreen/pbufferSven Gothel2011-11-067-42/+74
| | | | This allows allowing updateHandle()/destroyHandle() to be called.
* NativeWindow/JOGL: NativeSurface adds add/remove SurfaceUpdateListenerSven Gothel2011-11-069-104/+157
| | | | - SurfaceUpdateHelper contains impl. used by NativeSurface implementations.
* Impl layeredSurface (java/native):Sven Gothel2011-11-059-69/+314
| | | | | | | | - OSXUtil: NSView backing creation - OSXUtil: AttachJAWTSurfaceLayer - MacOSXCGLContext.create(): Attach NSOpenGLLayer if layered - MacOSXCGLDrawable.updateHandle(): if direct: add NSView backing layer - MacOSXCGLDrawable: Add getNSViewHandle() to distinguish between NSView and none (CGL/pbuffer)
* Cleanup ; JAWT* version flag setting based whetherSven Gothel2011-11-059-39/+73
| | | | | | | | | | Cleanup - use Platform OS_TYPE - .. JAWT* version flag - if JAWTWindow is Applet, attempt offscreenLayer if avail - ..
* OSX: CGL type cleanup ; layeredSurface impl.Sven Gothel2011-11-0514-191/+397
| | | | | | | | | - 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
* Merge branch 'master' into osx_jawt_calayersSven Gothel2011-10-296-9/+74
|\
| * test scriptSven Gothel2011-10-291-3/+7
| |
| * Test: More 'layouting' in NewtCanvasAWT test caseSven Gothel2011-10-291-0/+8
| |
| * Nativewindow/OSX: GetLocationOnScreen() must use [win frame] for window height.Sven Gothel2011-10-291-3/+7
| |
| * NEWT/Applet: Add 'newt.debug.Applet' ; Be more verbose in DEBUG Mode;Sven Gothel2011-10-292-2/+51
| |
| * Win32: Reuse Platform's OS VersionNumberSven Gothel2011-10-291-1/+1
| |
* | MacOsX/JAWT_SurfaceLayers/CALayers: Kick off / JAWT_getAWT() CALAYER version ↵Sven Gothel2011-10-297-23/+149
|/ | | | support.
* NEWT/OSX: Using NewtView softLock ; Adding debug info to solve assertion: ↵Sven Gothel2011-10-271-43/+86
| | | | | | | | | | | | | 'NSThemeFrame lockFocus' NSView.m:6053 - surfaceLock/Unlock: Use NewtView softLock - createWindow: - enable lock/unlockFocus to force realization of view - add retainCount in dbg-msg - clarify changeContentView
* NEWT/OSX NewtView: Add 'soft' pthread locking impacts: ↵Sven Gothel2011-10-272-14/+78
| | | | | | | | needsDisplay/displayIfNeeded, .. - Add 'soft' pthread locking (blockin) - impacts: needsDisplay/displayIfNeeded, .. - needsDisplay/displayIfNeeded also respects destroyNotifySend (ignore action if set)
* NEWT/OSX: Refine comment for native requestFocus(); Remove warningSven Gothel2011-10-261-2/+5
|
* NEWT/OSX: Can't use sending key/mouse directly to WindowImpl, deadlock .. ↵Sven Gothel2011-10-261-1/+7
| | | | see comment
* NEWT/OSX: Add missing sendKeyEvent(..) specialization to produce the keyCode ↵Sven Gothel2011-10-261-1/+10
| | | | (like enqueueKeyEvent())
* GLProfile: Add GLProfile getImpl(); Use getImpl() for getGL2ES[12](..), ↵Sven Gothel2011-10-262-72/+71
| | | | dropping GL2ES[12] lists
* OSX: Enable OpenGL profile support, ie OpenGL 3.2 -> GL3 for OSX >= 10.7Sven Gothel2011-10-266-153/+376
|
* Minor edits / cleanup of GLContext*Sven Gothel2011-10-266-26/+13
|
* MacOSX: Pull down (and fix releaseContext) NSOPENGL/CGL mode/impl, fixes SWT ↵Sven Gothel2011-10-2513-608/+515
| | | | usage and FBOMRT
* Add debug version of etc/test.*Sven Gothel2011-10-242-0/+70
|