summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Harmonize all runtime properties, see doc/Implementation/runtime-properties.txtSven Gothel2010-10-1116-18/+93
|
* JOGL: WindowsWGLDrawableFactory/X11GLXDrawableFactory: synchronize ↵Sven Gothel2010-10-093-79/+80
| | | | | | | sharedContext lock/release Unsynchronized lead to an 'context already locked by another thread' exception at initialization time (Windows: in general; X11: ATI and pbuffer drawable).
* NEWT: WindowImpl/GLWindow add zero size fast path; Reparent: Zero size -> ↵Sven Gothel2010-10-096-65/+99
| | | | | | pending creation NEWT/AWT: TestParenting03AWT use Container and add delay in addNotify(2nd-gl-element);
* Relocated RecursiveToolkitLock -> gluegen ; NEWT AWTParentWindowAdapter fix ↵Sven Gothel2010-10-0914-569/+314
| | | | | | | | | | | | | | | | | | & WindowImpl debug change ; Add NEWT/AWT unit test 1 frame - 2 NewtCanvasAWT Relocated RecursiveToolkitLock -> gluegen com.jogamp.nativewindow.impl.RecursiveToolkitLock -> com.jogamp.common.util.RecursiveToolkitLock NEWT AWTParentWindowAdapter fix - minimize action if status unchanged - added missing isValid() condition before runOnEDT.. NEWT WindowImpl: - debug output only if action triggered (resize/visible) Add NEWT/AWT unit test 1 frame - 2 NewtCanvasAWT - Testing case where AWTParentWindowAdapter provokes both GLWindow instances to resize/visible
* Fix RecursiveToolkitLock: Implement complete fair FIFO scheduler ↵Sven Gothel2010-10-091-30/+67
| | | | (wait-interrupt) using a LinkedList
* Fix: JOGL GLContextLock starvation; Tighten NEWT/AWT focus unit testsSven Gothel2010-10-087-46/+118
| | | | | | | | | | Fix: JOGL GLContextLock starvation - Apply changes made in RecursiveToolkitLock (c8a9c59e4838cd43090378a7ed60544449472801), ie notifyAll() -> notify(), plus sync (flow/mem) usage. Fix: Tighten NEWT/AWT focus unit tests - AWTRobotUtil.requestFocusAndWait() waits for EventCountAdapter gain and lost focus as well. - In case of NewtCanvasAWT, additionally wait for it's lost focus
* Fix: NEWT/AWT Focus unit testsSven Gothel2010-10-0712-34/+156
| | | | | | - Added reset() to EventCountAdapter, to ensure a unqiue start state - Removed 'lost focus' assertion, since this event might be pending and we don't poll on it or have a barrier
* Fix: NativeWindow RecursiveToolkitLock, GLWindow lockSurface/unlockSurfaceSven Gothel2010-10-078-89/+421
| | | | | | | | | | | | Fix: NativeWindow RecursiveToolkitLock - Use notify(), instead of notifyAll(), so only one thread is being awakened for the single resource. Otherwise starvation and timeout happen, since the oldest thread might not get waken up (earlier than other threads) within timeout. - Inner class for all synchronized (flow/mem) fields for easier fine grained sync/lock. Fix: GLWindow lockSurface/unlockSurface - Enter locked surface block only if surface lock could be acquired
* NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit testSven Gothel2010-10-0691-704/+1105
| | | | | | | | | | | | | | | | | | | | | | | | | 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()
* NEWT/AWT Jnit: Add Robot Mouse Click testSven Gothel2010-10-027-54/+256
|
* Increased junit timout to 30 min. Move ClickTimeout to MouseEvent (public)Sven Gothel2010-10-023-4/+7
|
* Newt/AWT Reparenting: Remove error prone requestFocus in critical pathSven Gothel2010-10-013-12/+4
|
* NEWT/AWT Unit Tests: Run one test at a time via superclass ↵Sven Gothel2010-09-3035-52/+117
| | | | | | | | | | | BeforeClass/AfterClass FileLock Due to the fact that any test with a UI may interfere with a UI test (test focus, active, ..), all tests are derived from the common UITestCase superclass, which decorates the test class with a FileLock at BeforeClass/AfterClass. Increased junit timeout to 10 min
* Newt/AWT Unit Test: Remove 'Test' Prefix from interfaceSven Gothel2010-09-301-0/+0
|
* Newt/AWT: Add singleton test instance lock for all AWT Robot tests, ↵Sven Gothel2010-09-306-1/+168
| | | | otherwise multiple parallel tests will render the result invalid
* NEWT Reparenting: Only lock parentWindow during native reparent attempt, ↵Sven Gothel2010-09-281-21/+27
| | | | otherwise it may cause deadlock (AWT EDT)
* NEWT: Newt/AWT Rollback AWTParentWindowAdapter changesSven Gothel2010-09-283-17/+4
|
* NEWT Focus fixes / out.println -> err.printlnSven Gothel2010-09-2813-36/+63
| | | | | | | | NEWT Focus fixes: WindowImpl.setFocusAction(): fix (was never set) NewtCanvasAWT.FocusActionImpl: KeyboardFocusManager.clearGlobalFocusOwner() after requestFocusAWTParent()
* NEWT Unit Focus Test: AWT Permanent focus check without focus count (due to ↵Sven Gothel2010-09-283-32/+59
| | | | temp loss) - instead test focus with key input.
* NEWT Unit Focus Test: Use AWT permanent focus check on request.Sven Gothel2010-09-285-56/+64
|
* JUnit test: Check of GL3 availability to not let test failSven Gothel2010-09-282-1/+42
|
* Unit test: Add 'Robot' for test classes using AWT RobotSven Gothel2010-09-283-6/+6
|
* NEWT Robot Unit Tests: Bring Window to Front and position mouseSven Gothel2010-09-275-47/+57
|
* NEWT EDT: Handle stop case if not on EDTSven Gothel2010-09-271-27/+43
|
* NEWT/AWT focus tests: Enhance, use robot and programatic. Start with a focus ↵Sven Gothel2010-09-269-92/+721
| | | | on an AWT device. Wait until TO or event received.
* NEWT: Add Window.hasFocus() ; Test cleanup ..Sven Gothel2010-09-267-5/+27
| | | | | | - Window add focus tracking and query via hasFocus() - TestTransformFeedbackVeryingsBug407NEWT allow fail if no GL3 is available - TestFocus01SwingAWT check on NEWTChild focus
* Add main() to TestFocus01SwingAWTSven Gothel2010-09-262-1/+34
|
* Ensure that receiving focus is passed on to any NEWT child.Steve Vaughan2010-09-261-6/+7
|
* New test to check on keyboard focus.Steve Vaughan2010-09-261-0/+189
|
* RecursiveToolkitLock default TO 5sSven Gothel2010-09-262-4/+4
|
* NEWT: Fix WindowImpl: Bring back 'isValid()' test no screen!=null in ↵Sven Gothel2010-09-263-6/+19
| | | | destroy() ; DisplayImpl: refCount reset
* NEWT: Fix destruction of not yet realized Window/Screen/Display ; Bug411 ↵Sven Gothel2010-09-264-43/+65
| | | | Test: Add parallel NEWT animation.
* Unit test for Bug 411 (Pre AWT/Swing Usage, Mixed usage with JOGL) - ↵Sven Gothel2010-09-256-23/+375
| | | | | | | | | | | | | GLCanvas NPE fix - NewtCanvasAWT added destroy(..) Unit test for Bug 411 (Pre AWT/Swing Usage, Mixed usage with JOGL): Added exhausting Pre AWT/Swing usage test utilizing a later JOGL init with GLCanvas and NEWTCanvasAWT. This works for NV+X11+Ubuntu+64bit, have to do more testing. GLCanvas NPE fix at destroy/dispose, check if already destroyed, ie context==null NewtCanvasAWT: Add destroy() and destroy(boolean unrecoverable)
* NEWT: Changed Lifecycle of Display/Screen (part 4) - Reparenting - TestsSven Gothel2010-09-2325-146/+557
| | | | | | | | | | | | | | | - Adapted tests to API changes - Notably new Display lifecycle / Reparenting tests: - TestDisplayLifecycle01NEWT - Tests display lifecycle - TestParenting01NEWT - Tests various reparenting cases (native/recreate) - TestParenting01bAWT - Tests Animator/FPSAnimator with reparenting (AWT/Newt) - Other changes: - TestGearsNEWT: Added 'on-the-fly' KeyAdapter inducing a GLRunnable into the GLWindow for fullscreen toggle. -
* NEWT: Fix Display/Window/Screen OO Identity, Reparenting and requestFocusSven Gothel2010-09-2339-2807/+3517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NativeWindow: Interface NativeWindow changes: - Remove 'throws' qualifier in lockSurface(), since it is not - Adding convenient 'one call' isSurfaceLockedByOtherThread() - Adding getSurfaceLockOwner() NEWT Window/GLWindow: - Unclutter Window/GLWindow relationship - save Window's indentity GLWindow's role is a GLAutoDrawable implementation aggregating (maybe even compositioning) a Window. The previous implementation just derived from the Window implementation, overwriting methods and fields - impossible to ensure sanity / completness. It was also not ensured that the added functionality of GLWindow (setVisible, destroy, ..) has been issued in case of handling the aggregated Window alone (window callbacks, ..). To solve this issue in a 1st attempt without changing the GLWindow API, Window is just an interface, being implemented by their specializations, hence sanity is intrinsic. GLWindow's added functionality is ensured by a Window.LifecycleHook interfaced implementation, registered at the aggregated Window. - Screen and Window are interfaces now (new files) - Display is an abstract class. - Their (abstract) implementations resides in impl/<BaseName>Impl - GLWindow implements Window as well - Remove Screen reference handled by setScreen(Screen) method. - Lock native parentWindow if used (createNative/reparenting) - Move lockSurface/unlockSurface from unchecked override pattern to an callback style using abstract methods lockSurfaceImpl/... - Sorting all methods to semantic sections, abstract, superinterface, .. - Reparenting: Handling different reparenting situations: - Unchanged - No change - Native Reparenting - Compatible Display/Screen, try native reparenting - Native (Re)Creation - Use destroy/create pattern - Native Creation Pending - Create later - setUndecorated() calls reconfigure Window now, ie tries to change the window actually - Don't issue 'requestFocus()' directly from the native implementation anymore, call it from the Java code. - Window/GLWindow/NewtFactory: Constructor simplification Avoid explosion of constructor overloading, ie removing the 'undecorated' variant, since this is redundant due to the 'setUndecorated(boolean)' method. - Fixed/added API documentation
* NEWT: Fix EDTUtil/DefaultEDTUtil - Locking/BehaviourSven Gothel2010-09-233-120/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EDTUtil: - Added documentation to EDTUtil interface - Removed 'stop()', introduced 'invokeStop(Runnable)', allowing proper shutdown with a final task (see doc). - Fix (c) header, since it is a new file, changed to interface with df161c9fcc1bc90d03e374e0eb8148424d4c5577 DefaultEDTUtil: - Move EDT scope volatile states (shouldStop, edtTasks) into inner class EventDispatchThread (the actual EDT). Fetching those outer instance values from within the inner EDT instance results in 'old values', ie this memory didn't get updates/synced. - Give the thread a proper name: <invocation-thread-name>-<custom-name>-EDT-<start-sequence-number> This allows easy identification of the EDT incl. indication of the 'start' sequence number. - Added fail-fast Exceptions in case of a stopped EDT with remaining tasks. This should validate/test the runtime behavior. - Ensure isRunning(), invokeStop(..) and waitUntilStopped() only returns after the last task has been executed. - invokeImpl/EDT.run: Complete task-lock coverage incl. wait case. - The final task is blocked until the wait() state in invokeImpl is reached. - EDT executes the final task and notifies the lock owner - then exist - invokeImpl leaves the wait state. - See EDTUtil API doc ..
* NEWT: Animator API Change - Changed Lifecycle of Display/Screen (part 4)Sven Gothel2010-09-2313-292/+731
| | | | | | | | | | | | | | | | | | | | | Change GLAutoDrawable interface: setAnimator(Thread) -> setAnimator(GLAnimatorControl) to minimize the setAnimator(..) calls and to allow fine grained control over the animation, ie in case of reparenting where the animation shall pause while changing the window(s). Introducing GLAnimatorControl interface: - abstract class AnimatorBase implements GLAnimatorControl - class Animator extends AnimatorBase - class FPSAnimator extends AnimatorBase This also changes FPSAnimator, since it is no more derived from Animator, use it's superclass or superinterface instead. +++ - Fix GLJPanel.paintComponent(): Don't issue reshape/display in case an external animator thread is animating. - Fix: Documentation [API]
* NEWT: Changed Lifecycle of Display/Screen (part 3)Sven Gothel2010-09-164-19/+33
| | | | | | | | | | | | | | - Fix DefaultEDTUtil deadlocks: Minimize locking! - invoke: - Check isCurrentThreadEDT() before locking edtLock - Check isRunning() redundant, since we start it beforehand - EventDispatchThread.run(): - Relax definition of EDTUtil::waitUntilIdle(), ie method may return while last task is being executed (see below). - Execute task outside of edtTasks lock. TODO: Fix more test cases (new and old)
* NEWT: Changed Lifecycle of Display/Screen (part 2)Sven Gothel2010-09-1518-206/+550
| | | | | | | | | | | | | | | | | | | | | Window Reparenting (unification): On the fly Display/Screen creation resides in NewtFactory. Reparenting logic within Window. Handles all reparenting cases now: ACTION_NONE, ACTION_SOFT_REPARENTING, ACTION_NATIVE_REPARENTING, ACTION_NATIVE_CREATION - out.println -> err.println ++++ - Bumbed windows bat scripts to 1.6.0_21 and ant 1.8.1 - Debug: /RecursiveToolkitLock.java TO is 300s for now, while not finished. - +++ Needs more testing. Deadlocks: AWT/NEWT parenting.
* Merge branch 'master' into newt_display_unkey_threadSven Gothel2010-09-1595-2108/+1853
|\
| * Misc CleanupsSven Gothel2010-09-159-43/+21
| | | | | | | | | | | | | | | | - www/index.html: absolute local refs -> relative - Platform GLContextImpl specialisations: remove local overriding drawable instance - X11ExternalGLXDrawable: Remove dead code, left over.
| * Merge branch 'master' of github.com:mbien/joglSven Gothel2010-09-1519-120/+73
| |\
| | * COPYRIGHT.txt no longer exists -> don't copy it.Michael Bien2010-09-141-1/+0
| | |
| | * Merge branch 'master' of git://github.com/sgothel/joglMichael Bien2010-09-1018-86/+98
| | |\
| | * | trivial code cleanup in glx package.Michael Bien2010-09-0917-118/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - locks are final - debug prints use System.err exclusively (to prevent message corruption) - removed unused imports, unused variables - code cleanup in some places
| | * | Fixed a couple of small glitches in the jogl websiteDemoscenePassivist2010-09-041-1/+2
| | | |
| * | | Removed COPYRIGHT.txt file, whichSven Gothel2010-09-1475-1962/+1776
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is redundant due to COPYRIGHT notice in LICENSE.txt. It's product usage terms are no more applicable, since our repository is not used by Sun Microsystems to deliver a product. LICENSE.txt changes: - Updated SGI FreeB license reference from 1.1 to 2.0 - Dropped Sun alternative license, which is redundant due to the FreeB 2.0 license. - Added JogAmp Community and common denominator: New BSD 3-clause license README: - Added contacts - Sun -> JogAmp - Added Michael Bien Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* / | NEWT: Changed Lifecycle of Display/ScreenSven Gothel2010-09-1045-505/+993
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Display/Screen: - Removed Display reusage by unique TLS key: type + name, instead use user-responsibility or Destroy-When-Unused (usage reference count). - Removed X11 Display TLS pool usage - Display creation means i, incl the later native one (X11). - Added reference counting as follows: - Display's refCount: number it is referenced by Screen: display.addReference()/display.removeReference() - Screen's refCount: number it is referenced by Window: screen.addReference()/screen.removeReference() - Lazy creation using refcount 0 -> 1 All resources are created when they are needed. This also removes redundant native Display/Screen objects, ie in case of [AWT] reparenting. - Default lifecycle is user-responsibility, ie no Destroy-When-Unused, where Window may be destroyed unrecoverable, which removes the Screen reference only. - If using optional Destroy-When-Unused a Window may be destroyed unrecoverable, which removes the Screen reference: Screen.removeReference(); IF Screen.refCount == 0 THEN Screen.destroy(); Display.removeReference(); IF Display.refCount == 0 THEN Display.destroy(); - Use Destroy-When-Unused lifecycle for all automatic created Display/Screen instances (GLWindow, NewtCanvasAWT,..) - Display/Screen destroy/create cycles valid, ie you can reuse destroyed Display/Screen's - EDTUtil: - Created right away. - Started always via invoke, if not running. - DefaultEDTUtil: - Simplified locking a bit locking on: - edtLock for start/stop - edtTasks for tasks queue - invoke-wait doubles check shouldStop - invoke-wait 'waiting' outside of edtLock +++ NEWT: Cleanup - Window.destroy/invalidate: deep -> unrecoverable - Window.isNativeWindowValid() -> Window.isNativeValid() to unify with Display/Screen - Window.isDestroyed() -> Window.isValid() to unify and simplify logic. Returns false if destroy(true) has been called. - NewtFactory.wrapDisplay(.. handle) -> NewtFactory.createDisplay(.. handle), since it actually creates a compatible display. +++ NativeWindow X11Util: Added non TLS createDisplay()/closeDisplay() +++ TODO: - Stabilize (many tests fail) - OSX
* / NEWT: Focus Fix + CleanupSven Gothel2010-09-0318-86/+98
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Issueing 'requestFocus' via the native EDT dispatch loop may cause a deadlock, due to a possible implicite AWT requestFocus call (NewtCanvasAWT). Approach: RequestFocus issued directly, by Window.requestFocus() and the native EDT dispatch loop, is queued for later execution by EDT. This shall decouple a possible native windowing TK resource collision. - X11Windows.c: Add missing 'reparented' param for requestFocus to force requestFocus after reparenting. - AWTWindow.java: Add requestFocusImpl() +++ NEWT: Cleanup - Remove Event Type Bits in: - EventListener.h - NEWTEventListener.java - Remove InputEvent 'consume' status -
* Fixed gl3.h GL_GLEXT_PROTOTYPES -> GL3_PROTOTYPES/GL_GL3EXT_PROTOTYPESOpenGL_4_1_IntegrationOpenGL_3_3_IntegrationSven Gothel2010-08-254-22/+10
|