aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
* GLX Information usage cleanupSven Gothel2011-11-257-190/+249
| | | | | | | - GLXUtil: Distinguish between client and server GLX information, cache client information. - GLXDrawableFactory: Utilize GLXUtil client data, as well as cache (SharedResource) GLX server data, avoiding 'uncontrolled' GLX queries, ie. w/o locking. - isMultisampleAvailable = isClientMultisampleAvailable && isServerMultisampleAvailable
* NativeWindow X11GraphicsDevice: Pass 'owner' for close-display operation @ ↵Sven Gothel2011-11-252-2/+2
| | | | constructor
* Nativewindow AWT Device/Screen: Cleanup construction [default, specific]; ↵Sven Gothel2011-11-253-3/+5
| | | | AWTDevice: Remove subtype
* JOGL/NativeWindow: Push down JOGL's X11AWTGLXGraphicsConfigurationFactory to ↵Sven Gothel2011-11-252-195/+11
| | | | | | | | | | | | | | NativeWindow X11AWTGraphicsConfigurationFactory X11AWTGraphicsConfigurationFactory properly construct a AWTGraphicsConfiguration encapsulated a native X11GraphicsConfiguration, now available for non JOGL modules, ie NEWT. AWTGraphicsConfiguration's create() utilizes the X11AWTGraphicsConfigurationFactory via the generic factory mechanism and hence allows encapsulating a native [X11]GraphicsConfiguration. NewtCanvasAWT creates/destroys the JAWT NativeWindow on addNotify/removeNotify (reparentWindow) again. Hence the JAWTWindow is instantiated completly only, instead of utilizing updateConfiguration(..), which simplifies the mechanism.
* GraphicsConfigurationFactory: Kick off 'registerFactory' via static method ↵Sven Gothel2011-11-2311-25/+39
| | | | | | instead of constructor for clarity. - prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
* NativeSurface's getGraphicsConfiguration() returns the native (delegated) ↵Sven Gothel2011-11-2330-49/+49
| | | | | | | | | | | AbstractGraphicsConfiguration, if delegation is used. This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration() to NativeSurface implementations and hence reduces complexity. NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration is controlled via get/set method avoiding flawed usage (read/write), since read access shall return the delegated AbstractGraphicsConfiguration, if used.
* X11GLXDrawableFactory.createOffscreenSurfaceImpl(): Create own screen/device ↵Sven Gothel2011-11-231-8/+14
| | | | | | | instance pair Don't use the shared device due to locking issues on X11. Other platform impl. usually don't have native semantics on device/screen and may use it.
* Fix GLDrawableFactory: Move 'GLContext getOrCreateSharedContext(..)' to non ↵Sven Gothel2011-11-212-16/+16
| | | | | | | | | | | | | | 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.
* WindowsWGLDrawableFactory createOffscreenDrawable() - Don't spin off ↵Sven Gothel2011-11-182-27/+17
| | | | creation on AWT thread (may deadlock)
* OS X Layered View Part8: Generalize OffscreenLayerSurface ; Use local JAWT ↵Sven Gothel2011-11-128-156/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* OSX: Fix context update callSven Gothel2011-11-122-6/+16
| | | | | It turns our that the native ContextUpdater does not work reliable in all cases, hence we need to verify if the drawable size has changed as well.
* Nativewindow: Introduce API private MutableGraphicsConfigurationSven Gothel2011-11-124-15/+24
| | | | | MutableGraphicsConfiguration allows derivations to set the chosen capabilities, hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
* OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl ↵Sven Gothel2011-11-112-2/+9
| | | | | | reparenting Test: enable NEWT 'onscreen' case
* Animator timeout/refinementSven Gothel2011-11-114-21/+22
| | | | | | | - AnimatorImpl: evaluate double negation if(!skipWaitForCompletion(Thread)) -> if(blockUntilDone(Thread)) - Simplify finishLifecycleAction() and reduce timeout
* Revert introduction of NativeSurfaceHolder and NativeWindowHolder interfacesSven Gothel2011-11-112-8/+9
| | | | | | | | | | | | | I was too fast introducing these accessors, since they are currently not needed and hence redundant. Complete - 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff Partial in regards to the holder interfaces only: - d8fa00d35a49f4faf5f04aeb7e2bba4e972965f5 - f51e3dad6c4bd1f6d0001cecf6a0f692400ed602 - 46542168d64b37f544f61802693f15b59b224e4e
* Minor edits: Remove dead code / fix dbg printfSven Gothel2011-11-111-52/+0
|
* OS X Layered View: Part6 (native) Using a root CALayer where we ↵Sven Gothel2011-11-102-25/+73
| | | | | | | | | | | | | | | | | 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)
* 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).
* MacOSXPbufferCGLDrawable: verbose debug messagesSven Gothel2011-11-101-1/+2
|
* NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-099-9/+9
| | | | | | | | | | | | 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).
* Cleanup offscreen/pbuffer drawables - minor editsSven Gothel2011-11-096-46/+28
|
* minor editSven Gothel2011-11-091-1/+1
|
* OS X Layered View: Part5 NEWT/AWT Interaction ; Fix NSOpenGLLayer pos ; CleanupSven Gothel2011-11-094-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Minor edits: remove redundanciesSven Gothel2011-11-091-2/+2
|
* NativeWindow: Add accessor interfaces NativeSurfaceHolder and NativeWindowHolderSven Gothel2011-11-091-3/+2
| | | | | | | | | | | | | | | | | - 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-093-82/+326
| | | | | | | | | | | | | | | | | | | | | | | 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-082-3/+12
|
* JOGL: Add 'struct timespec' (POSIX) utils for native time handlingSven Gothel2011-11-082-0/+82
|
* OS X Layered View: Use pbuffer method (pbuffer w/ dbl buffer)Sven Gothel2011-11-069-217/+441
| | | | | | | | | - 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.
* Impl layeredSurface (java/native):Sven Gothel2011-11-056-22/+182
| | | | | | | | - 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-053-2/+18
| | | | | | | | | | 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-052-126/+242
| | | | | | | | | - 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
* Win32: Reuse Platform's OS VersionNumberSven Gothel2011-10-291-1/+1
|
* 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-265-152/+365
|
* 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-2511-591/+499
| | | | usage and FBOMRT
* Test: NEWT Remote GLWindow w/ GL2ES1 (GLSL n/a on remote GLX, eg. NV)Sven Gothel2011-10-211-1/+1
| | | | | | | - X11GLXContext: Better error message (requested / has) - Test: - Need to fetch remote GLProfile for GLCapabilities, since local machine differs - Can't use GLSL (GL2ES2) on remote .. n/a w/ NV
* OSX: Fix CGL deleteContext()'s release call on MainThread (typo, shall have ↵Sven Gothel2011-10-161-2/+2
| | | | no ':' for void func call)
* OSX: Avoid invoking JNI or performSelectorOnMainThread in JNI if already ↵Sven Gothel2011-10-131-1/+1
| | | | mainThread
* MacOSX: Always release ctx on main thread (offscreen was frozen as well); ↵Sven Gothel2011-10-1310-69/+33
| | | | | | Cleanup Warnings and OSX ContextUpdater -
* MacOSX: Fix shared ctx release [onMainThread]; Make GLContextShareSet ↵Sven Gothel2011-10-136-212/+202
| | | | | | | | | | | | | | | | | 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.
* GLCanvas / GLWindow: Change 'manual' resize/repaint animation filterSven Gothel2011-10-132-1/+9
| | | | | | We not only shall skip windowing system triggered repaint if another animation thread is running, but also if the current thread is the animator thread. This keeps the animator intervals stable while resizing.
* JOGL/OSX: Properly utilize NSOpenGLContext update() via ContextUpdater, ↵Sven Gothel2011-10-135-41/+111
| | | | | | | | | | | | | | | 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.