summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add OSX Java7 build/test scriptsSven Gothel2013-01-302-0/+38
|
* OSX unit tests: Disable OSX 32bit tests (redundant - prepare for Java7 tests)Sven Gothel2013-01-291-2/+3
|
* Fix Bug 678: Deliver key-char value for printable chars on all ↵Sven Gothel2013-01-299-77/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | KeyEventListener (-> On Windows as well) The following is observed, where t0 and t1 refer to subsequent different timestamps: NEWT delivery order: PRESSED (t0), RELEASED (t1) and TYPED (t1) WINDOWS delivery order: PRESSED (t0), TYPED (t0) and RELEASED (t1) Windows Auto-Repeat: PRESSED (t0), TYPED (t0) Hence we changed the event reorder-code in NEWT to trigger NEWT-PRESSED on Windows-TYPED for printable chars, assuring key-char values on all listener callbacks. - KeyEvent.getKeyChar(): Removed disclaimer dedicated for Windows - Keyevent.isActionKey(): Completed for all NEWT non-printable action keys; Added static variant - Keyevent.isPrintableKey(): NEW: returns !isModifierKey(keyCode) && !isActionKey(keyCode) ; With static variant - Windows WindowDriver: - EVENT_KEY_PRESSED handles non-printable chars only - EVENT_KEY_TYPE handles printable chars only - Native: VK_DELETE passes keyCode - Unit tests: Wait for completion 1s -> 2s
* Add WindowClosingProtocol impact detail on ↵Sven Gothel2013-01-281-1/+10
| | | | WindowListener.windowDestroyNotify(..)
* Bug 665 (part 3) - Allow dis-association of GLContext's GLDrawable .. - Add ↵Sven Gothel2013-01-277-53/+219
| | | | | | | | | | | | | | | | | | | | | | | | | EGL/ES2 tests, attempt to fix wrapped EGL case - Bug 665 (part 2) was commit 7fd5f76e1eb4bbf93fe9b1171744bd755d8f96e4 - Add EGL/ES2 tests in - TestGLContextDrawableSwitch01NEWT - TestGLContextDrawableSwitch11NEWT - Attempt to fix wrapped EGL case (incomplete) - Using EGL/ES w/ non native EGL device/surface, but natively wrapped instances (most of the cases), a 'complicated' delegation of Native-Upstream -> EGL-Proxy -> EGL-Instance is being used heavily relying on the objects lifecycle. GLEventListenerState tries to roll back the realized state and even sets the upstream device handle, but this doesn't seem to be sufficient on X11. Discussion: It might turn out that we only can implement the survival of GLContext and it's display device reliable w/ EGL within the GLAutoDrawable implementation, which can hold the previous not destructed instances.
* Fix regression of commit b738983638703bb721ee4c9820c8ef43e2252e73, possible ↵Sven Gothel2013-01-271-1/+4
| | | | 'pulling' display's device - check references
* GLDrawableHelper.invoke: If drawable is !realized -> deferred executionSven Gothel2013-01-271-2/+2
|
* Fix misc API docs ..Sven Gothel2013-01-273-3/+6
|
* Animator: API doc cleanup, isPaused()==true if drawablesEmpty (Animator == ↵Sven Gothel2013-01-273-19/+41
| | | | | | | | | | | | FPSAnimator behavior), resume after add ifPaused() - GLAnimatorControl: Refine API doc - Animator.run(): - if( drawablesEmpt) { pausedIssued = true; } - Same behavior as FPSAnimator - AnimatorBase.add(..) - consider paused case if no drawablesEmpty, i.e. if ( isPaused() ) { resume(); }
* Refine GL[Auto]Drawable 'realized' state in API doc, and relax it's realized ↵Sven Gothel2013-01-265-18/+31
| | | | | | | | | | | | | requirement in GL[Offscreen]AutoDrawableDelegate* Compatible w/ 'before'. TODO: Contemplate about GLDrawableFactory.createOffscreenAutoDrawable(..) whether it: - should better return an unrealized [auto]drawable - or adding another API method for such case Goal: Allow passing vector of [device/context/..] for use cases such as re-using an onscreen destructed surface and on-/offscreen hopping.
* WGLContext: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-261-1/+5
|
* ProxySurface: Add 'NativeSurface getUpstreamSurface()' ; ProxySurfaceImpl: ↵Sven Gothel2013-01-263-16/+32
| | | | | | | | | | | | | | Don't cache 'displayHandle' - ProxySurface: Add 'NativeSurface getUpstreamSurface()' allowing querying direct access of a backing surface representing this instance. - Use case: EGLWrappedSurface - Default impl. returns null - ProxySurfaceImpl: Don't cache 'displayHandle' - getDisplayHandle() is 'final', no more 'shortcut' code allowed due to re-association incl. display handle. - See commit b738983638703bb721ee4c9820c8ef43e2252e73
* [EGL/X11]Context: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-262-10/+20
|
* FBObject/GLFBODrawableImpl: Silence stderr if not in DEBUG mode relying on ↵Sven Gothel2013-01-262-18/+23
| | | | | | | | | | | application handling verbosity and debug output The following cases were dumping states on stderr: - FBOObject.isStatusValid() if false -> Only dumps if DEBUG - GLFBODrawableImpl.reset() if fboResetQuirk becomes true and 1st time in ClassLoader -> Only dumps if DEBUG
* Bug 665 (part 1) - Allow dis-association of GLContext's GLDrawable ..Sven Gothel2013-01-2428-239/+925
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes allowing re-association (incl. null) of GLContext/GLDrawable: - GLAutoDrawable: Refine API doc 'setContext(..)' - GLContext: Refine API doc: 'setGLDrawable(..)' 'getGLDrawable()' - GLContextImpl.setGLDrawable(): Handle null drawable - GLAutoDrawableDelegate/GLAutoDrawableBase: Allow null GLContext - GLDrawableHelper.switchContext(..)/recreateGLDrawable(): Balance GLContext.setGLDrawable(..) calls - New GLEventListenerState, holding state vector [GLEventListener, GLContext, .. ] impl. relocation of all components from/to GLAutoDrawable. - GLDrawableUtil - Using GLEventListenerState for swapGLContextAndAllGLEventListener(..) +++ NEWT Window*: - getDisplayHandle() is 'final', no more 'shortcut' code allowed due to re-association incl. display handle. - close*: - close config's device (was missing) - null config +++ Changes allowing reconfig of Display handle as required to re-associate pre-existing GLContext to a 'window': - AbstractGraphicsDevice: Add isHandleOwner() / clearHandleOwner() - Impl. in X11GraphicsDevice and EGLGraphicsDevice, NOP in DefaultGraphicsDevice - DefaultGraphicsConfiguration add 'setScreen(..)' - MutableGraphicsConfiguration - Make DefaultGraphicsConfiguration.setScreen(..) public - NativeWindowFactory add 'createScreen(String type, AbstractGraphicsDevice device, int screen)' - Refactored from SWTAccessor - NativeWindow x11ErrorHandler: Dump Stack Trace in DEBUG mode, always.
* Android: Allow selection of native window formats RGBA8888, RGBX8888 and ↵Sven Gothel2013-01-2011-58/+308
| | | | | | | | | | | | | | | | | | | | | | | | RGB565; Fix HiSilicon/Vivante/Immersion.16 EGLConfig selection (zero depth buffer @ visualID) - NEWT/Android Fix PixelFormat/NativeWindowFormat/VisualID Selection - Fix allows proper selection of native window formats: RGBA8888, RGBX8888 and RGB565 - Selection is performed in 3 steps: 1) @ Construction (non native): SurfaceHolder.setFormat( getSurfaceHolderFormat( caps ) ) 2) @ Native Surface Creation: getANativeWindowFormat( androidFormat) -> ANativeWindow_setBuffersGeometry(..) Note: The set native format is revalidated, i.e. read out via ANativeWindow_getFormat(..). 3) @ EGL Creation: ANativeWindow_getFormat(..) -> fixCaps(..) - simply fixing the chosen caps. - NEWT GLWindow.GLLifecycleHook.resetCounter: - Also reset GLAnimatorControl's counter, if attached. - NEWT WindowImpl -> GLLifecycleHook.resetCounter() calls issued _after_ operation before unlock(). - JOGL/EGLGraphicsConfigurationFactory - Validate whether the visualID matching EGLConfig depth buffer is suitable. On HiSilicon/Vivante/Immersion.16: Depth buffer w/ matching visualID is zero! - NativeWindow/Capabilities.compareTo: Fix alpha comparison
* Android/NewtVersionActivity: Dump avail. GLCaps / Use stderr, since log ↵Sven Gothel2013-01-192-8/+28
| | | | would cap 'em (too long).
* TestSwingAWTRobotUsageBeforeJOGLInitBug411: Fix 'chicken egg' init problem ↵Sven Gothel2013-01-192-3/+14
| | | | | | w/ AWTRobot, i.e. NativeWindow not yet initialized. Regression since: 50f997557b91a2f014ef0c2ea848c5c326d0cfb2
* Adapt to change 5060b728b26a89a14367f8fca9f4eb7968f719ca: ↵Sven Gothel2013-01-192-5/+7
| | | | ShaderState.uniform(..) returns false if no location available.
* NEWT/Android: Full Lifecycle for WindowDriver; Using static ViewGroup; ↵Sven Gothel2013-01-198-215/+367
| | | | | | | | | | | | | | | | AWTRobotUtil: More tolerant for non AWT env.; Fix adb-launch-* - NEWT/Android WindowDriver - Full Lifecycle, remove refs on closeNative() - Respect isFullscreen() - Using static ViewGroup if available and surface not ready, allows running from main() - AWTRobotUtil: More tolerant for non AWT env. - Check for NEWT first - Only use AWT iff available, which allows running on Android - Fix adb-launch-* - Launch main/junit tests
* Fix Bug 669: Recursive GLContext makeCurrent()/release()Sven Gothel2013-01-186-39/+368
| | | | | | | | | | | | | | | | | | | | | | Culprit: GLContext's makeCurrent() didn't clear the boolean flag 'unlockContextAndSurface' in case the context is already current (-> recursion). Above case was detected within a code block tailed by a finally block, which acted on mentioned flag, i.e. called lock.unlock() and hence decremented the lock count even though the method return w/ successful state. Fixed. Added debug code: GLContext.release() debug code (DEBUG | TRACE_SWITCH), recording stack trace of last release() call, which is dumped in case no current was current. Added 2 unit tests: - Simple recursive GLContext makeCurrent()/release() from within GLEventListener's display(). Test also validates lock count and lock ownership. - GLAutoDrawable display() of another GLAutoDrawable from within GLEventListener's display(..).
* Sync LauncherUtil w/ GlueGen commit 1b9f0739ecc25105384b557afa698c42e08d4cc6 ↵Sven Gothel2013-01-181-13/+57
| | | | (adding main-cmdline-args)
* README: Add new IRC channel, mark Jabber deprecatedSven Gothel2013-01-161-1/+3
|
* README: Add new IRC channel, mark Jabber deprecatedSven Gothel2013-01-161-1/+3
|
* Merge remote-tracking branch 'xranby/NEWT-input'Sven Gothel2013-01-161-1/+2
|\
| * LinuxMouseTracker: Fix inverted Y-axis & missing button release.Xerxes Rånby2013-01-151-1/+2
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | ShaderState: Reduce hash-map utilization at shader switch (reset ↵Sven Gothel2013-01-152-47/+62
|/ | | | uniforms/attributes); Refine API doc.
* NEWT-MouseEvent getWheelRotation() API Update - Fixes Bug 659: NEWT ↵Sven Gothel2013-01-1428-272/+750
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Horizontal Scrolling Behavior (OSX, X11, Win32); Bug 639: High-Res Mouse-Wheel - API update 'float getWheelRotation()': Usually a wheel rotation of > 0.0f is up, and < 0.0f is down. Usually a wheel rotations is considered a vertical scroll. If isShiftDown(), a wheel rotations is considered a horizontal scroll, where shift-up = left = > 0.0f, and shift-down = right = < 0.0f. However, on some OS this might be flipped due to the OS default behavior. The latter is true for OS X 10.7 (Lion) for example. The events will be send usually in steps of one, ie. -1.0f and 1.0f. Higher values may result due to fast scrolling. Fractional values may result due to slow scrolling with high resolution devices. The button number refers to the wheel number. - Fix Bug 659: NEWT Horizontal Scrolling Behavior (OSX, X11, Win32) - See new API doc above - X11/Horiz: Keep using button1 and set SHIFT modifier - OSX/Horiz: - PAD: Use highes absolute scrolling value (Axis1/Axis2) and set SHIFT modifier for horizontal scrolling (Axis2) - XXX: Use deltaX for horizontal scrolling, detected by SHIFT modifier. (traditional) - Windows/Horiz: - Add WM_MOUSEHWHEEL support (-> set SHIFT modifier), but it's rarely impl. for trackpads! - Add exp. WM_HSCROLL, but it will only be delivered if windows has WS_HSCROLL, hence dead code! - Android: - Add ACTION_SCROLL (API Level 12), only used if layout is a scroll layout - Using GestureDetector to detect scroll even w/ pointerCount > 2, while: - skipping 1st scroll event (value too high) - skipping other events while in-scroll mode - waiting until all pointers were released before cont. normally - using View config's 1/touchSlope as scale factor - Fix Bug 639: High-Res Mouse-Wheel - getWheelRotation() return value changed: int -> float allowing fractions, see API doc changes above. - Fractions are currently supported natively (API) on - Windows - OSX - Android - AndroidNewtEventFactory ir refactored (requires an instance now) and AndroidNewtEventTranslator (event listener) is pulled our of Android WindowDriver.
* Fix Bug 666: GLBase.java line 438 contained some invalid trailing characters ↵Sven Gothel2013-01-121-1/+1
| | | | (regression from e7064ece049705e013d80985eae698ce0ee3c4e3)
* Move all Exclusive Context Thread (ECT) tests to it's own package to ↵Sven Gothel2013-01-1214-25/+25
| | | | de-clutter core test package
* Adding GEOMETRY_SHADER support in ShaderCode, adding core ↵Sven Gothel2013-01-1213-53/+613
| | | | | | | | | | | | | | | | | | | GL3/GEOMETRY_SHADER unit tests. ; Simplified GLContext version number - Adding GEOMETRY_SHADER support in ShaderCode, adding core GL3/GEOMETRY_SHADER unit tests Chuck Ritola reported in December 2012 that we lack support of GEOMETRY_SHADER and he provided a test case. The latter is cleaned up to use GL3 core profile features only tesing a pass-through and the flip-XYZ geometry shader. ShaderUtil is fixed. - Simplified GLContext version number The OpenGL major/minor version is now hold in a VersionNumber instance to simplify usage. Also expose it via getGLVersionNumber() while marking getGLVersionMajor() and getGLVersionMinor() deprecated.
* build/test: newt-headless shall exclude AWT/SWTSven Gothel2013-01-111-0/+2
| | | | TestNewtEventModifiersNEWTWindowAWT was incl. in newt headless
* Add old Olympic demo from GL4Java - Make it use ES1 and suitable for ↵Sven Gothel2013-01-112-0/+498
| | | | FixedFunctionEmul.
* Minor: GLWindow fix size validation; GLContextImpl: Remove hold ctx lock ↵Sven Gothel2013-01-112-7/+4
| | | | count constraints at destroy.
* GLAutoDrawable/AnimatorBase: Add ExclusiveContextThread (ECT) feature; ↵Sven Gothel2013-01-1132-492/+2815
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AnimatorBase: Add setModeBits/MODE_EXPECT_AWT_RENDERING_THREAD; FPSAnimator: Make transactions deterministic. ExclusiveContextThread (ECT) allows user to dedicate a GLContext to a given thread. Only the ECT will be allowed to claim the GLContext, hence releasing must be done on the ECT itself. The core feature is accessible via GLAutoDrawable, while it can be conveniently enabled and disabled via an AnimatorBase implementation. The latter ensures it's being released on the ECT and waits for the result. Note that ECT cannot be guaranteed to work correctly w/ native (heavyweight) AWT components due to resource locking and AWT-EDT access. This is disabled in all new tests per default and noted on the API doc. Note: 'Animator transaction' == start(), stop(), pause(), resume(). - Add ExclusiveContextThread (ECT) feature - GLAutoDrawable NEW: - Thread setExclusiveContextThread(Thread t) - Thread getExclusiveContextThread() - AnimatorBase NEW: - Thread setExclusiveContext(Thread t) - boolean setExclusiveContext(boolean enable) - boolean isExclusiveContextEnabled() - Thread getExclusiveContextThread() - AnimatorBase: Add setModeBits/MODE_EXPECT_AWT_RENDERING_THREAD Allows user to pre-determine whether AWT rendering is expected before starting the animator. If AWT is excluded, a more simple and transaction correct impl. will be used. - FPSAnimator: Make transactions deterministic. FPSAnimator previously did not ensure whether a transaction was completed. A deterministic transaction is required to utilize ECT. FPSAnimator now uses same mechanism like Animator to ensure completeness, i.e. Condition and 'finishLifecycleAction(..)'. Both are moved to AnimatorBase. Tested manually on Linux/NV, Linux/AMD, Windows/NV and OSX/NV. - All new tests validated correctness. - All new tests shows an performance increase of ~3x w/ single GLWindow, where multiple GLWindows don't show a perf. increase.
* Fix GLArrayDataClient createGLSL(..) 'name' setting; Also adds equal ↵Sven Gothel2013-01-031-3/+3
| | | | | | | | | behavior for Client/Server FFP usage. - GLArrayDataWrapper's init() only validated and set the 'name' for VBO ARRAY_BUFFER usage and validates it, regardless of FFP or GLSL usage. - GLArrayDataWrapper's init() included the no-VBO case to the above 'name' set/validate code path.
* Update PNGJ 0.85 -> 1.12 (w/ interlace read support) ; Added PNG Interlace ↵Sven Gothel2012-12-3157-1457/+3946
| | | | read tests (TestPNGTextureFromFileNEWT)
* Enhance PMVMatrix: Use FloatStack to implement PushMatrix and PopMatrix (Bug ↵Sven Gothel2012-12-312-32/+31
| | | | | | | | | | | | | 657) One FloatStack for each, MV, P and T, with initialialSize zero to save memore and growSizes: MV = 16 arrays, P = 2 arrays, T = 2 arrays, with array = 16 floats. This shall save performance due to the preallocated stack when used and growing only in the above mentioned grow intervals. We may finetune the growSize, if required.
* NEWT WindowsWindow.c: UpdateInsets: Fix determiniation of isUndecorated - ↵Sven Gothel2012-12-301-1/+1
| | | | WS_SYSMENU is _not_ an indication!
* Bug632: Test NEWT Child Window Translucency (X11/Windows) ..Sven Gothel2012-12-3010-43/+219
| | | | | | | | | | | | | - Windows: Child window is not translucent at all - X11: Child window is translucent to parent's background, however - parents content is _not_ 'composed in'. - TODO: Find whether there is a solution or not. - Note: The child window does not change it's rel. position if parent moves! This is a feature, since we don't have impl. a layout.
* SharedResourceRunner: Always dump Exception if catched @ creation, not just ↵Sven Gothel2012-12-301-3/+1
| | | | | | in DEBUG case. This seems to be crucial, since otherwise user is left in the dark w/o enabling debug flags.
* setGLFunctionAvailability(..): Unify GLInt and GLString version validation; ↵Sven Gothel2012-12-301-50/+102
| | | | | | | | | | | | | | | | | Refines commit b6ae4e4dcbd740dd57de9dc3280d943e98cdaa76 - Limit getGLIntVersion() w/ non ARB ctx to 3.0 - similar to getGLVersionNumber(.., String). - GLInt only proceeds w/ valid version - Always test GLInt version before GLString version, cont. w/ GLString version if GLInt failed. - Fail if strictMode and GLInt failed, but GLString reports GL >= 3.0 - Fail is strictMode and neither GLInt nor GLString could validate version - Clear glError before succeeding (could be tainted by GLInt version test)
* Cleanup / Simplify: setGLFunctionAvailability(..) / ↵Sven Gothel2012-12-303-51/+118
| | | | | | | | | | createContextARBVersions(..) GL Version Validation String or integer based GL version validation now happens in setGLFunctionAvailability(..) depending on the requested profile. Due to the 'strictMatch' argument the method fails early when unsatisfied also allowing to simplify createContextARBVersions(..) implementation.
* Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only) ; No ↵Sven Gothel2012-12-295-45/+310
| | | | | | | | | | | | | | | | | | | PROFILE_ALIASING compat -> core ; Fix setGLFunctionAvailability(..) failure path @ profile query - Add GLRendererQuirks.GLNonCompliant, marking a GL context/profile non compliant. Currently: 'Mesa DRI Intel(R) Sandybridge Desktop' && 3.1 compat profile - Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only) Detect case using new GLRendererQuirks.GLNonCompliant in setGLFunctionAvailability() and return 'false'. - No PROFILE_ALIASING compat -> core Use true core GL profiles / context if available to ensure proper API behavior across platforms due to different functionality. E.g. don't use GL3bc if GL3 is requested. - Fix setGLFunctionAvailability(..) failure path @ profile query Destroy temp context & zero result to cont. iterating through GL versions. This missing cleanup lead to returning the faulty GL context handle and it's mapping/usage.
* Adapt change of commit d93c5d23e304ea20e868595748f92a5bef4f5703 to unit test ↵Sven Gothel2012-12-292-28/+78
| | | | (GLCanvas realization point)
* AWT GLCanvas: More strict GLDrawable realization [on AWT-EDT], skip if ↵Sven Gothel2012-12-282-7/+8
| | | | | | | | | | | | | | | | | | | | creation is not possible on AWT-EDT. The Intel HD3000 OpenGL driver on Windows will deadlock @ SwapBuffers in case the drawable is created on a thread other than the window owner thread. We are aware of such possibilities, nevertheless the AWTEDTExecutor.singleton.invoke(..) allowed to execute the runnable in case it cannot be invoked on AWT-EDT. The latter is the case if the current thread is not the AWT-EDT _and_ is holding the AWT tree-lock. With GlueGen commit 0b43b43f889ad7fc220942b0076e2001ca3cf13f, the invoke method now consumes an argument allowing to restrict the execution to AWT-EDT only. In such case, the drawable will be realized at a later time from the AWT-EDT. Such a situation could be triggered if a Frame's setVisible(true) is not issued from the AWT-EDT, as it should be! However, to relax such use cases - we better recognize such possible dealock and avoid it.
* adb-launch-main.sh: ANDROID_SDK_HOME -> ANDROID_HOMESven Gothel2012-12-271-2/+2
|
* Android build scripts: Fix env. name ANDROID_SDK_HOME -> ANDROID_HOMESven Gothel2012-12-272-20/+20
| | | | | | | | Intuitively I assumed ANDROID_SDK_HOME to be pointing to the SDK root dir, however this is not true: Semantics by Android tools are: ANDROID_SDK_HOME - Users ~/.android folder ANDROID_HOME - SDK root folder
* NEWT/Android: Fix NewtBaseActivity.getWindow() recursion if used w/o ↵Sven Gothel2012-12-251-1/+1
| | | | delegated Activity, i.e. our ActivityLauncher (Completes commit a35beb22d712b6da85a794115b19d484a12c8643)
* Test*NewtEventModifiers*: Clear 'clearing' events on thread - @Before/@After ↵Sven Gothel2012-12-252-44/+34
| | | | | | -> execOffThreadWithOnThreadEventDispatch Remaining 'clearing' events from _releaseModifiers() and escape() broke test case.