aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
Commit message (Collapse)AuthorAgeFilesLines
* OSX CALayer fix for Java7 (force CALayer to 0/0, always remove all animations)Sven Gothel2012-02-131-5/+15
|
* NEWT/OSX CALayer Animation Fix: Use '[layer removeAllAnimations]', '[layer ↵Sven Gothel2012-01-161-6/+0
| | | | removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition]' doesn't work
* MaxOSXWindowSystemInterface: deleteContext / releaseNSOpenGLLayer:Sven Gothel2011-12-171-9/+24
| | | | | - release on main-thread doesn't wait anymore - use recursive lock
* OSX GLLayer (native): Remove CALayer add/remove/swap sublayer animation; Fix ↵Sven Gothel2011-11-261-8/+7
| | | | | | | DestroyNSWindow0 The CALayer animations (add/remove/swap) confused somewhat rendering (layer position) and even triggered a deallocation sometimes.
* OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl ↵Sven Gothel2011-11-111-1/+8
| | | | | | reparenting Test: enable NEWT 'onscreen' case
* OS X Layered View: Part6 (native) Using a root CALayer where we ↵Sven Gothel2011-11-101-22/+70
| | | | | | | | | | | | | | | | | 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)
* OS X Layered View: Part5 NEWT/AWT Interaction ; Fix NSOpenGLLayer pos ; CleanupSven Gothel2011-11-091-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Part2 Java/Native MacOSXCGLContext / MacOSXPbufferCGLContextSven Gothel2011-11-091-41/+286
| | | | | | | | | | | | | | | | | | | | | | | 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)
* OS X Layered View: Use pbuffer method (pbuffer w/ dbl buffer)Sven Gothel2011-11-061-0/+151
- 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/.. ! -