| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main-thread deadlock'ed due to locked shared context
NSOpenGLLayer::openGLContextForPixelFormat(..) is performed on main-thread at 1st NSOpenGLLayer display method.
This happened irregulary, i.e. sometimes (T0) right after NSOpenGLLayer creation and attachSurfaceLayer()/AddCASublayer(..),
sometimes later (T1).
NSOpenGLLayer::openGLContextForPixelFormat(..) uses the passed shared user context.
The shared user context is locked at NSOpenGLLayer's creation (T0) and if performed at this early time
the call deadlocks due to pthread_mutex wait for the shared user context.
This fix performs NSOpenGLLayer creation and layer attachment while the shared user context
is kept unlocked and enforces NSOpenGLLayer display and hence NSOpenGLLayer::openGLContextForPixelFormat(..).
Added CGL.setNSOpenGLLayerEnabled(..) to enable/disable NSOpenGLLayer - currently not used.
- Passed AddRemove tests for GLCanvas/Swing and GLWindow/NewtCanvasAWT w/ 100 loops on Java6 and Java7 on OSX.
- Passed Instruments Leaks test w/ 10 loops on Java6 and Java7
|
|
|
|
| |
Move tests to 'acore'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't issue removeNotify(), delete drawable and context only!
- Fix Bug 675: NPE w/ Beans.setDesignTime(true)
- Carefully consider Beans.isDesginTime() fixes NPE - added unit test
- Fix GLCanvas.destroy(): Don't issue removeNotify(), delete drawable and context only!
- AWT removeNotify() shall only be issued via AWT itself, not manually
- Add 'destroyImpl(boolean destroyJAWTWindowAndAWTDevice)' to be called by
- GLCanvas.destroy(): destroyImpl( false );
- GLCanvas.removeNotify(): destroyImpl( true );
- Ensures JAWTWindow and AWTDevice are created and destroyed via the AWT callbacks
addNotify() and removeNotify() only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'CGL.releaseNSOpenGLLayer' triggers release - but very late w/ AWT usage.
OSXUtil_RemoveCASublayer0's added '[subLayer release]' in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161
is wrong, since 'CGL.releaseNSOpenGLLayer' actually does trigger it's release.
This was not seen w/ AWT tests, since it happens very later.
A NewtCanvasAWT test disclosed this error -> removed that extra release call.
The culprit for the late release w/ AWT usage was CGL.createNSOpenGLLayer's call in the current thread.
Moving it to the Main-Thread fixed the problem.
All CALayer lifecycle calls are issued on the Main-Thread now.
NSOpenGLLayer's CVDisplayLink OpenGL fitting via 'CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext'
is now performed at it's context creation in 'NSOpenGLLayer::openGLContextForPixelFormat'.
The 'extra' release of the NSOpenGLLayer's NSOpenGLContext as introduced in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161
is still valid.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Layers and native GL-Context are _not_ Released ; Java Side wait for Main-Thread
- Fix Bug 690: Occasional Freeze on CVDisplayLinkStop
- NSOpenGLLayer.disableAnimation() shall not claim the renderLock mutex,
since the CVDisplayLink callback could be waiting for the lock.
This waiting callback could freeze the call to CVDisplayLinkStop.
- Fix Bug 691: Layers and native GL-Context are _not_ Released
- Following proper release cycle:
Context unrealized:
- JAWTWindow.detachSurfaceLayer() -> OSXUtil.RemoveCASublayer(..)
- CGL.releaseNSOpenGLLayer(..)
JAWTWindow.destroy()
- MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..)
- OSXUtil.DestroyCALayer(..)
- 'Magic' CALayer release calls (w/o manual retain beforehand) at:
- OSXUtil.RemoveCASublayer(..): [subLayer release]
- MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..): [rootLayer release]
- OSXUtil.DestroyCALayer(..): [rootLayer release]
- 'Magic' NSOpenGLLayer's NSOpenGLContext dealloc:
- [NSOpenGLContext clearDrawable]
- CGLDestroyContext( [NSOpenGLContext CGLContextObj] )
- Java Side wait for Main-Thread
- Waiting for the delegated Main-Thread on the Java side eases debugging
and won't block the Main-Thread in native code.
- Utilizing this for all CALayer calls
Test case: TestGLCanvasAddRemove01SwingAWT
|
|
|
|
|
|
|
|
| |
threading and resource usage
- Still excluse OSX
- Respect sun.java2d.opengl property
- [Prepare] Allowing OGLPipeline thread usage w/o it's OGL resource usage
|
| |
|
|
|
|
| |
pausedIssued); Update TestGLWindows02NEWTAnimated (isPaused())
|
|\
| |
| | |
Add LinuxEventDeviceTracker used by RaspPi newt/driver/bcm/vc/iv
|
| |
| |
| |
| |
| |
| |
| | |
The NEWT VK namespace tries to map keyCodes
to its Unicode varianti, make use this quirk.
Signed-off-by: Xerxes Rånby <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
The LinuxEventDeviceManager will start new EventDevicePoller threads
when more /dev/input/event* files become available.
Signed-off-by: Xerxes Rånby <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
| | |
|
| |
| |
| |
| | |
b47d0d92dd222999bf38633de1cec8de6a7ad369
|
|/ |
|
|
|
|
|
|
|
| |
always sent.
This foremost fixes an issue w/ OSX/Java7 and NewtCanvasAWT offscreen CALayer usage,
which utilizes AWTKeyAdapter and AWTNewtEventFactory (AWT -> NEWT) key events.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
WindowListener.windowDestroyNotify(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
'pulling' display's device - check references
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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(); }
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
would cap 'em (too long).
|
|
|
|
|
|
| |
w/ AWTRobot, i.e. NativeWindow not yet initialized.
Regression since: 50f997557b91a2f014ef0c2ea848c5c326d0cfb2
|
|
|
|
| |
ShaderState.uniform(..) returns false if no location available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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(..).
|
|
|
|
| |
(adding main-cmdline-args)
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
|/
|
|
| |
uniforms/attributes); Refine API doc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(regression from e7064ece049705e013d80985eae698ce0ee3c4e3)
|
|
|
|
| |
de-clutter core test package
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|