aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove ancient DEC licensed file, use std X11 Xinerama extension instead.Sven Gothel2010-11-045-652/+5
|
* NEWT DisplayImpl: Use ArrayList and index, no Iterator ; Misc cleanupSven Gothel2010-11-042-27/+40
|
* NEWT DefaultEDT: always catch and report Exceptions, don't disturb EDTSven Gothel2010-11-041-1/+2
|
* increase time per test from 500ms to 1sSven Gothel2010-11-041-1/+1
|
* AWT create/destroy shall run on EDT as wellSven Gothel2010-11-041-11/+4
|
* JOGL/X11: Decorate glxMakeContextCurrent calls from ↵Sven Gothel2010-11-041-10/+20
| | | | makeCurrentImpl/releaseImpl with X11 Error Handle
* Seperated unit tests (newt/awt/headless) and cleaned up some imports and ↵Sven Gothel2010-11-0426-129/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comments Seperated unit tests (newt/awt/headless) - no more *CORE* tests - junit.run.newt.headless: all NEWT headless (no-AWT) tests, without any AWT classes and with -Djava.awt.headless=true. Disabled for 'isOSX'. - junit.run.newt: all NEWT non AWT tests (same as above), but with full AWT. This test is not enabled via junit.run. Disabled for 'isOSX'. - junit.run.awt: all AWT tests without NEWT - using newt.event.jar to add AWT agnostic NEWT event adapter - junit.run.newt.awt: all NEWT + AWT tests - junit.run: junit.run.newt.headless,junit.run.awt,junit.run.newt.awt - swizzling around a few tests to achieve the above: TEST rules: - A runnable unit test must start with 'Test' - Only pure NEWT tests must have 'NEWT' in their name - AWT tests must have 'AWT' in their name. - AWT + NEWT tests must have '.newt.' in their package name, hence - Pure AWT tests (without NEWT) must not have '.newt.' in their package name
* NEWT Window Lifecycle / ScreenMode:Sven Gothel2010-11-034-107/+117
| | | | | | | | | | Lifecycle.reparentActionPre()/reparentActionPost() -> pauseRenderingAction()/resumeRenderingAction() for a more generic use, ie reparenting and screen mode change. ScreenMode change: No more visibility/fullscreen changes, no more locking, just pause/resume animation. X11 ScreenMode set: move from thread/wait to simple polling over time (timeout)
* NEWT: ScreenModeUtil fix, misc changesSven Gothel2010-11-033-55/+26
| | | | | | | | ScreenModeUtil fix: - return 'null' for an empty list, check if list is null or empty. - remove 'validate' Window: TIMEOUT_NATIVEWINDOW 500 -> 1000 ms
* JOGL/X11: Fix context scanning, misc simplifications ..Sven Gothel2010-11-036-93/+83
| | | | | | | | | | | | | | | | | | | Fix context scanning --------------------- Ie on 3.0 NVidia systems, trying to create a 4.1 context leads to a BadAlloc X11 error. A prev patch disabled the X11 error handler, to reduce sideeffects. In case AWT is not being used, the BadAlloc isn't catched and the JVM freezes within the native function call. Decorating context scanning with NativeWindow's 'setX11ErrorHandler' solves this issue. Simplifications ----------------- X11: always try a direct context. If this is not possible due to the display connection, an indirect is being used anyways. Hence 'createContext(boolean direct)' -> 'createImpl()'. X11/WGL: Simplify the context creation logic a bit.
* JOGL GLContextImpl: Trigger ProcAddressTable mapping via ↵Sven Gothel2010-11-031-8/+13
| | | | | | 'setGLFunctionAvailability' call while scanning all available context. .. also reorder context scanning from low -> high
* JOGL DrawableFactory/AWT: Only use AWT factory if AWT is enabledSven Gothel2010-11-033-25/+30
| | | | .. and a little cleanup in the X11 SharedResourceRunner
* NativeWindow: Provide 'setX11ErrorHandler(boolean onoff)'Sven Gothel2010-11-032-12/+51
|
* Minor cleanup: strings, unused vars, ..Sven Gothel2010-11-027-17/+24
| | | | | | | | | | DEBUG strings w/ thread name nativewindow.TraceLock -> nativewindow.debug.ToolkitLock.TraceLock Sync Xmisc (DummyWindow) with NEWT's creation test scripts: awt and non-awt usage
* Fix macosx NEWT warningsSven Gothel2010-11-021-1/+2
|
* Fix macosx compilationSven Gothel2010-11-021-10/+10
|
* Fix focus test for windows: increase mouse click start delay, so previous ↵Sven Gothel2010-11-023-23/+3
| | | | focus click won't be counted
* Windows: define DISPLAY_DEVICE_ACTIVE, if not alreadySven Gothel2010-11-021-4/+6
|
* ScreenMode: Ignore modes < 15bppSven Gothel2010-11-022-4/+8
|
* Newt/Windows: Turn off native VERBOSESven Gothel2010-11-011-1/+1
|
* Added Rotation testSven Gothel2010-11-012-50/+114
|
* Fix: Newt Rotation (Windows) - added description (CCW)Sven Gothel2010-11-015-121/+119
|
* Fix ScreenMode ; Add FatalError to NewtCommon.c ; Fix Windows BuildSven Gothel2010-10-297-95/+124
| | | | | | | | Fix ScreenMode - Avoid NPE/Out-of-memory: Return zero sized NewIntArrays instead of NULL. Fix Windows Build - ScreenMode still has a regression
* Using GLCanvas _and_ NEWT side by side currently causes a deadlock in AWT ↵Sven Gothel2010-10-291-0/+7
| | | | with AMD drivers
* JOGL: HashMap ProcAddressTable for all GL profiles incl GLX/WGL/CGL/EGLSven Gothel2010-10-2910-96/+166
| | | | | | | Reduce (performance/footprint) overhead of ProcAddressTable recreation, instead use a hashmap (major, minor, profile) -> ProcAddressTable. Remove GL2ES12 implementation profile, redundant.
* Test: Add new Display Lifecucle testSven Gothel2010-10-291-0/+391
|
* Tests: Accomodate previous changes plus using AWT EDT for setVisible() as well.Sven Gothel2010-10-2911-149/+81
|
* Changed Lifecycle of NEWT Display/Screen (part 5)Sven Gothel2010-10-297-92/+246
| | | | | | | | | | | | | | | | | | -------------------------------------------------- Per default, creating a NEWT Display tries to reuse an existing one to match the native platform display semantics closer. The 'key' for a Display reuse is it's FQN. The difference with the old 'reusage' is the removal of the TLS binding, hence we use a global pool. The user is able to 'override' this 'reuse' behavior with 'NewtFactory.createDisplay(String name, boolean reuse)'. However, it is not recommended for AMD drivers (see above). Screen's are always reused if possible. The 'key' for a Screen reuse is it's FQN, hence it's reuse depends on the Display reuse.
* Proper X11 Display ClosingSven Gothel2010-10-2914-229/+271
| | | | | | | | | | | | | | | | | | | | | X11Util: Removed TLS semantics, since TLS name -> dpy mapping is erroneous at this point. Added lists for open connections (for optional later shutdown). AbstractGraphicsDevice interface and implementations: Adding 'close()' method allowing native implementations the ability to close the native resource, ie X11GraphicsDevice. This becomes necessary for 'on the fly' created X11 Display connections, ie in X11AWTGLXGraphicsConfigurationFactory, which enables closing. Utilize 'close' call in use cases: GLCanvas, GLJPanel and AWTCanvas. Remove active X11 Display creation in X11JAWTWindow, as a last resort, use the X11SunJDKReflection method. Used for reference only, not active rendering etc, mostly for on the fly AWT parenting in NewtFactoryAWT. However, these 'on the fly' references are erroneous and should be remodelled, ie passice and active X11GraphicsDevice's ..
* remove positive RANDR messageSven Gothel2010-10-291-2/+0
|
* Promoted the shutdown hook from GLDrawableFactoryImpl to GLProfile.Sven Gothel2010-10-298-225/+337
| | | | | Each GLDrawableFactory implementation provides a shutdownInstance() method, issued by GLProfile.
* ThreadingImpl: AWT semantic cleanup.Sven Gothel2010-10-292-24/+25
| | | | | | Use GLProfile's AWT available status. If mode == AWT, then the AWTThreadingPlugin must be available, else throw exception. Made AWTThreadingPlugin's 'isOpenGLThread' compatible with 'invokeOnOpenGLThread'.
* Animator Fix/CleanupSven Gothel2010-10-289-63/+104
| | | | | | | | | | | | | | | | | | | | | | - Fix AnimatorBase: Finally using 'com.jogamp.opengl.util.AWTAnimatorImpl', wrong FQN lead to never use it, hence deadlock in case of AWT usage (AWT-EDT). - Animator - remove volatile for synced state isAnimated - new state isPaused, since shouldPause give the wrong answer for isPaused() - Cleanup wait condition for lifecycle tasks (start/stop/pause/resume) - 'AnimatorImpl' -> 'DefaultAnimatorImpl implements AnimatorBase.AnimatorImpl' - 'AWTAnimatorImpl implements AnimatorBase.AnimatorImpl', hence no derivation of a complete overwritten AnimatorImpl needed. - GLWindow.destroyActionPreLock() - Stop animator if unrecoverable, else pause only. Tests: - No explicit animator stop, hence tests implicit stop/pause by GLDrawableHelper and/or GLWindow.
* WindowImpl/GLWindow LifecycleHook:Sven Gothel2010-10-278-69/+154
| | | | | | | | | | | - 'destroyAction' -> 'destroyActionPreLock' 'destroyActionInLock', to be able to stop animation before locking. GLDrawableHelper.invokeGL() dispose case (initAction == null): - pause animator if animating before makeCurrent (locking) GLCanvas/GLJPanel dispose: recreate case - resume animator if was animating
* GLAnimatorControl/Animator: Allow stop() if paused()Sven Gothel2010-10-272-11/+7
|
* TestSwingAWTRobotUsageBeforeJOGLInitBug411: Verbosity, proper destroy sequenceSven Gothel2010-10-271-3/+15
|
* Minor: fix imports, JAWTUtil: query headless 1st (faster), ↵Sven Gothel2010-10-274-5/+17
| | | | NativeWindowFactory added nonAWT ToolkitLock create method
* Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6; Misc ..Sven Gothel2010-10-265-30/+112
| | | | | | | | | | | Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6 - Workaround in TestGLWindows01NEWT: same create/destroy order - Prove bug with simple native test app: jogl/test/native/displayMultiple02.c Misc: - Reverted d52181032830acdd5e4069a41ccd0daff5922d8a, ie reenable x11IOErrorHandler (nativewindow) - GLDrawableHelper: methods -> final - X11Util.NamedDisplay: remove unused RecursiveLock, Cloneable
* can't enable x11IOErrorHandler without disableSven Gothel2010-10-263-3/+16
|
* X11Util: lock toolkit/x11 unificationSven Gothel2010-10-263-221/+130
|
* RectangleReadOnly clonable; Make strings more readableSven Gothel2010-10-267-15/+15
|
* NEWT: ScreenMode changesSven Gothel2010-10-2642-1722/+3018
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New type definition: ScreenMode { MonitorMode { SurfaceSize { Resolution, bpp }, ScreenSizeMM, refreshRate }, rotation }, where Resolution and ScreenSizeMM are of type DimensionReadOnly - ScreenMute instance is - immutable - hashable - cloneable The above allows fast query and storage w/o redundancies. More than 300 modes via permutation could be expected. ScreenMode impl. changes: ScreenImpl: To be implemented methods by native specialization: - protected int[] getScreenModeFirstImpl() - protected int[] getScreenModeNextImpl() - protected ScreenMode getCurrentScreenModeImpl() - protected boolean setCurrentScreenModeImpl(ScreenMode screenMode) The data unification etc is implemented generic using ScreenModeUtil and the 'int[]' streaming. ScreenModeStatus holds all ScreenMode related data and provides a locking strategy. ScreenModeListener provides a callback facility for ScreenMode change events. - Screens listen to ScreenModeStatus, so all FQN referenced Screen's receive the change. - Windows listen to Screen, to take appropriate action for the event (fullscreen, reshape). Misc: - Screen/Display: promoting 'addReference'/'removeReference' to public interface, so a user may trigger construction/destruction (-> junit tests, plus other clients than WindowImpl). - Gears: 'setSwapInterval' at 'reshape' instead of 'init', so it's reset when ScreenMode is changing. -
* Make ScreenMode public, ie move from newt.impl to newt.Sven Gothel2010-10-218-7/+9
|
* Merge branch 'master' of http://github.com/sgothel/joglRami Santina2010-10-2120-847/+1473
|\ | | | | | | | | | | | | | | | | | | | | 18bf27fa86da1f26fd085565f501736816d2f2e9 Conflicts resolved: src/newt/classes/com/jogamp/newt/impl/WindowImpl.java src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java src/newt/native/WindowsWindow.c src/newt/native/X11Window.c
| * NEWT: Fix / Stabilize Fullscreen/Decoration/Reparenting Mode ChangesSven Gothel2010-10-2120-830/+1453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - setSizeImpl/setPositionImpl/reparent -> reconfigureWindowImpl - setVisible(boolean) is state checked (500ms) for better reliability on resource creation. Guarantees valid surface. - reparentWindow: start pos of child -> top is current position on screen - reparentWindow: Recheck success (setVisible), if failed fall back to recreate, which gets rid of a lost child windows (1/20) .. - reparentWindow: if size failed, reconfigure for size again - add toggle decoration - unify nfs_ size/pos state - WindowsWindow.c/X11Window.c: Unify size/pos settings - X11Window.c: - NewtWindows_setFullscreen: use 'root of screen' instead of 'default root of display' - Adding SubstructureNotifyMask incl event semantics - Parse ReparentNotify (debugging of reparenting) Misc: - Add native getLocationOnScreen() impl to avoid possible AWT deadlock - setSize/setPosition/setFullScreen -> EDT - More documentation on expected native implementation semantics
| * merge conflict solvedSven Gothel2010-10-152-7/+56
| |\
| | * Fix: X11 Fullscreen mode behaviourRami Santina2010-10-111-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Event of fullscreen is sent to the display root and properties of fullscreen are set on our window/screen defined source attachment of data sent using XSendEvent to be normal application (required) cleaned up the code. replaced tabs with spaces
| | * Added Fullscreen WM Hit to the X11 windowRami Santina2010-10-112-6/+58
| | | | | | | | | | | | | | | when true the request is send after configuring the window otherwize before decoration. needs tweeking to ensure that the fullscreen is on-off
* | | Added Windows Impl for ScreenMode and rotation change; Windows Fullscreen HintRami Santina2010-10-207-54/+495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added windows implemenation for screen mode change lifecycle and screen rotation screen modes. +++++++++++ Added getHighestAvailableRate() to Screen mode as a helper function which loops over the available rates of this screen mode and returns the highest available. Added toString impl to ScreenMode. +++++++++++ Unit Tests: TestScreenMode01NEWT,TestScreenMode02NEWT are modified adding the gears as GL event listeners. +++++++++++ Notes: 1- Screen modes with bits per pixel values not same as current are currently filtered out. 2- Since windows stores the Display settings differently you will see some duplicate values which the documentation says is usual. These modes are not filtered out in getScreenModes(). Keeping values same as provided from windows enum. 3- BitsPerPixel is currently natively read on windows only.
* | | Added Screen Rotation manipulation API (with X11 impl)Rami Santina2010-10-188-32/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added screen rotation change capability with impl for X11 (using Xrandr) com.jogamp.newt.Screen: added 2 methods which cover screen roation lifecycle setScreenRotation(int rot): Change the Screen Rotation to one of the rotations defined in ScreenMode, namely: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270 int getCurrentScreenRotation(): Get the Current screen rotation returns -1 if not implemented natively. +++++++++++++++++++++++++ Notes: 1- At init the original rotation is called natively and cached, when screen is destroyed the rotation is reverted. 2- On X11 with Nvidia: you need to edit /etc/X11/xorg.conf: Add the following line: Option "RandRRotation" "on" in Section "Device" after BoardName. +++++++++++++++ Added TestScreenMode02NEWT which includes 4 tests 1- Rotate 90 2- Rotate 180 3- Rotate 270 4- Rotate with screen mode change should fail if screen rotation not implemented natively. (4) withh fail if screen mode not impl natively as well.