aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Added Unit-Test for Bug 532 to test Animator behavior w/ CardLayout and ↵Sven Gothel2012-01-061-0/+173
| | | | diff. Platforms
* Screen: width/height reflects virtual Screen size (-> big-desktop)Sven Gothel2011-12-232-18/+1
| | | | | | | | | | Add updateScreenSize() utilizing new getNativeScreenSizeImpl() to set/update the virtual Screen size. This replaces setScreenSize() where the ScreenMode dimension was being used which doesn't reflect the virtual size. ScreenMode Test Impact: We cannot assertEquals(sm.getRotatedWidth(), screen.getWidth()), since ScreenMode size != virtual size.
* NEWT Multi-Monitor 1/2: Allow negative window position; Validate Screen-Index;Sven Gothel2011-12-232-35/+112
| | | | | | | | | | | | | | | | - Allow negative window position, using flag 'autoPosition' to mark a custom user position. This impacts Windows and X11 window creation code, which supports native auto positioning. - Screen: Validate Screen-Index. In 'big-desktop' mode the Screen index is always 0. This is true for X11 with Xinerama enabled and MS-Windows in general. Platforms w/o multiple Screen support always use index 0. - X11: Separate X11 Display/Screen/Window native code in their respective C files - Windows test scripts: use '%*' to catch all arguments - Add missing (c)
* Fix SWT test on OSX 32/64 bit ; Fix TestSWTAWT01GL for OSXSven Gothel2011-12-192-41/+52
| | | | | | | | | | | Fix SWT test on OSX 32/64 bit: - Pick 32bit SWT for 32bit tests Fix TestSWTAWT01GL for OSX: - Using proper thread for AWT and SWT actions, platform agnostic but required for OSX. - Enable SWT*AWT* tests on OSX
* TestInitConcurrentNEWT: Nice window layout - don't wait/sync for start ↵Sven Gothel2011-12-181-16/+52
| | | | thread, only for shutdown.
* No GLCanvas offscreen surface (as in NEWT) - test disabledSven Gothel2011-12-181-1/+2
|
* New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and ↵Sven Gothel2011-12-172-49/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | NewtCanvasAWT/GLCanvas (delegation) ; Fix GLCanvas OffscreenLayerSurface usage. JAWTWindow.destroy(): - No more getGraphicsConfiguration().getScreen().getDevice().close() call, since the configuration (hence the device) is passed @ creation and owned by the caller. New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and NewtCanvasAWT/GLCanvas (delegation) - Abstract offscreenLayer option to be delegated by using classes - Allow offscreen testing of GLCanvas as well (like NewtCanvasAWT) Fix GLCanvas OffscreenLayerSurface usage - common 'createDrawableAndContext()' for context and drawable instance creation - addNotify() calls createDrawableAndContext() after super.addNotify() to be able to lock the surface (JAWTWindow) and hence to determine offscreen usage. - reshape(...) issues recreation 'dispose(true)' in case of using an offscreen layer - dispose() explicitly destroys the JAWTWindow NewtCanvasAWT: - explicitly close the device of the JAWTWindow (as GLCanvas does) Tests: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT
* setGLFunctionAvailability(..): Reduce the calls to resetProcAddressTable() ↵Sven Gothel2011-12-132-1/+54
| | | | | | | | | | | 12 -> 7 in initialization. Reducing the calls to resetProcAddressTable() 12 -> 7 in initialization, saves: Linux/AMD: 600ms -> 300ms Linux/NV: 161ms -> 112ms OSX 10.7/NV: 522ms -> 397ms Still some freezes on OSX 10.6.8/NV .. further analysis is going on.
* Fix nano -> milli (10e6 -> 1e6) .. ooopsSven Gothel2011-12-135-19/+19
|
* Fix GLDrawableFactory lack of GLProfile initialization in case get*Factory() ↵Sven Gothel2011-12-137-0/+145
| | | | is called 1st, add tests. Add performance numbers of init/shutdown in tests.
* Fix concurrency bug of GLProfile initialization ; Fix SharedResourceRunner ↵Sven Gothel2011-12-1154-117/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dead' thread (Applets) GLDrawableFactory: - clarify: public getWasSharedContextCreated(..) -> protected createSharedResource(..) - add: getSharesResourceThread() GLProfile: - proper locking of initSingletion(..) path: - Use RecursiveThreadGroupLock and add/remove GLDrawableFactory's sharesResourceThread while creating it's the sharedResource. This simplifies and fixes GLProfile's locking code. - Fix and simplify initSingleton(boolean) API doc - mark it deprecated. - Add initSingleton() for controlled initialization only, pairing w/ shutdown(..) Remove initSingleton(boolean) calls in code and test! +++ Fix SharedResourceRunner 'dead' thread (Applets) In Applets, stopping an Applet makes the browser Java plugin interrupting and killing all related threads, including our SharedResourceRunner thread. - Validate whether the shared resource thread is alive - Catch interruption in shared resource thread and assume it's a kill signal - releaseSharedResource: clear devicesTried set
* Remove GLProfile.initSingleton(..) out of static init blockSven Gothel2011-12-021-4/+0
|
* Test AWT Translucency: Use ReflectionUtil to use com.sun.awt.AWTUtilities, ↵Sven Gothel2011-12-022-4/+20
| | | | n/a on some AWT impl.
* More AWT-EDT invokeAndWait-wrapping for Frame show/disposeSven Gothel2011-12-024-53/+54
|
* New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle ↵Sven Gothel2011-12-019-26/+436
| | | | | | | | | | | | | | | | | | | | | Management - Leave Platform, .. TempJarCache untouched. - GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched, for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency. - SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory - COMPLETE: additionally shutdown GLContext* Clear all cached GL/GLX proc-address and device/context mappings. - Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets - X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources. - JAWTWindow.destroy(): Close the delegated device. In case it's X11 this closes the exclusive opened X11 Display.
* Test: Add TestSharedContextVBOES2NEWT2 (ES2 variant of ↵Sven Gothel2011-11-292-2/+160
| | | | TestSharedContextListNEWT2)
* Test: Forgot to uncomment package name of new test for ↵Sven Gothel2011-11-291-1/+1
| | | | 97218b88af9113740b3704a3666d7356cdc83cd0
* Fix Bug 527: Creating a context w/ shared context, while the latter is in ↵Sven Gothel2011-11-281-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use (threading) Bug 527 describes the situation where wglShareLists() fails (throws exception) while the shared context is in use by another thread (some Animator). It was reported by Jerome Jouvie. The exception happens not everytime, but at least around 20% on manual tests I have performed on the Windows platform. The context in question are all JOGL's GL2, which natively where bound to an OpenGL 3.0 profile. The WGL_ARB_create_context spec says http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt: +++ Future versions of OpenGL may only support being added to a share group at context creation time. Specifying such a version of a context as either the <hglrc1> or <hglrc2> arguments to wglShareLists will fail. wglShareLists will return FALSE, and GetLastError will return ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB. +++ Hence the 1st patch was to remove 'wglShareLists()' usage in case we use the new WGL_ARB_create_context context creation method. Even though this is a desired change, and works in general, it didn't fix the issue. It seems that the shared context, which is passed @ new context creation, cannot be used while it is in use itself in another thread. This conclusion leads to the actual fix, ie. locking the shared context while creating the new context which shares it. Manual tests using this patch could not reproduce this issue (40 attempts). Test: TestSharedContextListNEWT2
* MacWindow: Impl. DriverUpdatePosition; Alias position2TopLevel -> ↵Sven Gothel2011-11-271-1/+2
| | | | | | | | getLocationOnScreenImpl Since the MacWindow position needs to be changed in concert with the parent, we need to be triggered to update ours. AWTParentWindowAdapter issues 'updatePosition()' if DriverUpdatePosition is implemented.
* TestScreenMode00bNEWT: Reduce getCurrentScreenMode loop 100 -> 50, due to ↵Sven Gothel2011-11-261-2/+2
| | | | slow processing on CentOS / HD3400
* TestParenting03AWT: manual test option -firstUIAction for ↵Sven Gothel2011-11-261-0/+4
| | | | GLProfile.initSingleton(firstUIAction)
* TestsGLSLShaderState*: Reduce loops / Extend timeout - Slow devices may hit ↵Sven Gothel2011-11-263-9/+11
| | | | TO otherwise.
* Add Test case for bug 519Sven Gothel2011-11-251-0/+127
| | | | | | | | | | | Completes review of the underlying locking mechanism: - commit e341ad8db546530b3a49c56c32cc26980e296201 - commit c84e235b3284d0e18481748b44594116e25821a9 - commit a94c1a2945a31aa5d93e354da3bc80f59f253ec4 - commit 7ae0f2df39692e82d7955dbcd09c35c36382726c - commit 6b8f6e8d7c548cb6bfed14d8a04c9cf252ca7c4d - commit 9ef0a0c185ace5217efc014809e97c5eead842cc - commit 0314be79a7a93931a74fe4322bc78e699d7741e9
* Minor test changesSven Gothel2011-11-252-1/+5
|
* Fix native manual test 'displayMultiple02' for multiple X11 Display ↵Sven Gothel2011-11-251-6/+2
| | | | | | | connection open/close in various order XLockDisplay/XUnlockDisplay shall only be used if XInitThreads() was successful, otherwise it has no effect (X11 spec).
* NativeSurface's getGraphicsConfiguration() returns the native (delegated) ↵Sven Gothel2011-11-235-6/+6
| | | | | | | | | | | 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.
* Fix X11Util.dumpOpenDisplayConnection() ; Bug 515: Update fglrx driver ↵Sven Gothel2011-11-231-19/+71
| | | | remark and native test.
* Test NEWT Remote Connection (X11): Use localhost:0.0 as defaultSven Gothel2011-11-232-2/+2
|
* Add Unit Test TestGearsAWTAnalyzeBug455 to analyze bug455 - inconclusiveSven Gothel2011-11-211-0/+166
|
* Fix GLDrawableFactory: Move 'GLContext getOrCreateSharedContext(..)' to non ↵Sven Gothel2011-11-212-93/+89
| | | | | | | | | | | | | | 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.
* Merge pull request #40 from michaelhermannweber/bug_523Sven Gothel2011-11-201-0/+791
|\ | | | | New test case that demonstates bug 523, hang on application exit
| * New test case that demonstates bug 523, hang on application exit ifMichael Weber2011-11-041-0/+791
| | | | | | | | | | GLContext objects are shared across GLWindow instances. This bug does not manifest in the latest source.
* | Tests: Use WindowFocusListener for AWTRobot toFront(.. window), more reliableSven Gothel2011-11-204-6/+87
| |
* | minor edits: test, scriptsSven Gothel2011-11-201-1/+0
| |
* | Demo: GearsES1/ES2 visualize focusSven Gothel2011-11-192-3/+16
| |
* | NEWT/AWT Focus traversal enhancement/fix (incl. OS X fixes)Sven Gothel2011-11-192-35/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - MacWindow/OffscreeSurface - Exclude native NEWT window calls in case it's an offscreen surface - MacWindow/DriverClearFocus - Introduce driver detail DriverClearFocus interface - OS X needs to clear the focus, before another TK (eg. AWT) can claim it's (native parent window focus) - MacWindow/KeyCode: - Move OS X keyCode utils to MacKeyUtil - MacKeyUtil now uses OS X virtual key codes first, before matching keyChar -> keyCode - NewtCanvasAWT - Issue all AWT 'requestFocus()' on current thread, Newt-EDT -> AWT-EDT may freeze Window's native peer requestFocus() impl. - FocusAction directly issue action on Newt-EDT, also request AWT focus if not having it (proper AWT traversal) - Add an FocusPropertyChangeListener, detecting focus lost to issue DriverClearFocus's clearFocus() if available. - merge configureNewtChildInputEventHandler() code into configureNewtChild() to simplify call tree. - WindowImplAccess: Use getDelegatedWindow()
* | NEWT Window: Promote/Expose 'Window getDelegatedWindow()' for accessing the ↵Sven Gothel2011-11-1911-13/+11
| | | | | | | | delegate (ie GLWindow)
* | Focus Test: Don't assume NewtCanvasAWT even received the focusSven Gothel2011-11-182-2/+0
| |
* | NEWT/AWT Focus Traversal / Deadlock Fix (Windows) ; Harmonized NEWT ↵Sven Gothel2011-11-186-18/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | OS X Layered View Part8: Generalize OffscreenLayerSurface ; Use local JAWT ↵Sven Gothel2011-11-121-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl ↵Sven Gothel2011-11-111-0/+5
| | | | | | | | | | | | reparenting Test: enable NEWT 'onscreen' case
* | NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
| |
* | Fix TestParenting03AWT: NewtCanvasAWT has always a NativeWindowSven Gothel2011-11-091-28/+28
| | | | | | | | - Also make layout nice ..
* | OS X Layered View: Part5 NEWT/AWT Interaction ; Fix NSOpenGLLayer pos ; CleanupSven Gothel2011-11-091-0/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-099-10/+10
| |
* | NativeWindow/JOGL: NativeSurface adds add/remove SurfaceUpdateListenerSven Gothel2011-11-061-1/+1
|/ | | | - SurfaceUpdateHelper contains impl. used by NativeSurface implementations.
* Test: More 'layouting' in NewtCanvasAWT test caseSven Gothel2011-10-291-0/+8
|
* MacOSX: Pull down (and fix releaseContext) NSOPENGL/CGL mode/impl, fixes SWT ↵Sven Gothel2011-10-251-3/+0
| | | | usage and FBOMRT
* Tests: AWT EDT: invokeLater(..) -> invokeAndWait(..) for a more predictable ↵Sven Gothel2011-10-2310-72/+120
| | | | workflow