| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
FixedFunctionEmul.
|
|
|
|
| |
count constraints at destroy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
read tests (TestPNGTextureFromFileNEWT)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
WS_SYSMENU is _not_ an indication!
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
| |
in DEBUG case.
This seems to be crucial, since otherwise user is left in the dark w/o enabling debug flags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(GLCanvas realization point)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
delegated Activity, i.e. our ActivityLauncher (Completes commit a35beb22d712b6da85a794115b19d484a12c8643)
|
|
|
|
|
|
| |
-> execOffThreadWithOnThreadEventDispatch
Remaining 'clearing' events from _releaseModifiers() and escape() broke test case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test*NewtEventModifiers for SWT (TestNewtEventModifiersNewtCanvasSWT)
- Misc OSX/SWT: OSXUtil.RunOnMainThread(..) refinement
- 'waitUntilDone' is implemented on Java site via lock/wait on RunnableTask to not freeze OSX main thread.
- Fix Test*NewtEventModifiers for SWT (TestNewtEventModifiersNewtCanvasSWT)
- Deal with SWT's requirement to run the SWT event dispatch on the TK thread,
which must be the main thread on OSX.
We spawn off the actual test-action into another thread,
while dispatching the events until the test-action is completed.
- AWTRobot: Add 'void requestFocus(Robot robot, Object obj, int x, int y)'
- Use waitForIdle() only if programmed in Robot (Deadlock w/ OSX SWT)
- Required for SWT usage (see above)
|
|
|
|
| |
delegated Activity, i.e. our ActivityLauncher
|
|
|
|
| |
BaseNewtEventModifiers ignore more events (clicked, wheel, entered, exited); Fix TestNewtEventModifiersNewtCanvasSWT SWT-Display thread.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TODO: NEWT Event Factories. Misc: Cleaned up spacing.
On some native OS, the accumulation of pressed button modifier-mask is not available, e.g. OS X.
NEWT WindowImpl.doMouseEvent(..), invoked by native NEWT events,
will track the pressed mouse button modifier-mask, similar to mouseButtonPressed to synthesize the DRAGGED event.
Added NEWT WindowImpl.doKeyEvent(..) to honor the pressed mouse button modifier-mask,
i.e. pass it w/ key events as well.
TODO: Unify synthesization of NEWT event artifacts as described by the above,
allowing NEWT event translation to benefit from same code to gain same semantics.
Notable: AWTNewtEventFactory and SWTNewtEventFactory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Finetune delay
- Wait for eventCount
- Fix Listener concurrency
- Manually tested (enabled in our unit tests now)
- Tool Combinations
- NEWT GLWindow
- AWT GLCanvas
- NewtCanvasAWT
- NewtCanvasSWT
- On
- Linux/X11
- Windows
- OSX(+)
(+): Failure NEWT: When multiple buttons are pressed,
only the last one is visible via modifier MASK.
"expected:[button1, button2], have: [button2]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- AWTNewtEventFactory's awtModifiers2Newt:
- always include NEWT BUTTON_MASK (press, release, ..)
where AWT doesn't include them at release (it's only a DOWN_MASK).
- Test BaseNewtEventModifiers, ..
- No need to call super class Before, BeforeClass, .. manually
- Use RedSquareES2 as GL demo
- Adapt to AWTNewtEventFactory's modifier change above (NEWT BUTTON MASK even at release)
- More descriptive error/log text
- Added _mandatory_ TestNewtEventModifiersNEWTWindowAWT
to test native NEWT behavior.
This shall be the golden behavior all translated events shall compare w/.
|
|
|
|
| |
com.jogamp.opengl.test.junit.newt.event
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
811e3791b98fea0dfa3b7d301cb532c54df8dc82: AWT-NEWT Modifier mapping - part-2
AWTNewtEventFactory:
- getAWTButtonMask() -> getAWTButtonDownMask()
- using proper _DOWN_MASK values (regression of commit 13168c99ff9e8bf71c83f1be7afee270a3db4074)
- com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER buttons
- adding 'ModifierMappings.txt' to API doc header
- remove obsolete 'int awtModifiers2Newt(int awtMods, boolean mouseHint)'
- 'int awtButton2Newt(int awtButton)' 1:1 button name mapping
Tests:
- rename TestNewtEventModifiers -> BaseNewtEventModifiers
to avoid being picked up by our junit testing framework.
The latter tests all classes starting w/ 'Test*'
|
|
|
|
| |
clean (was using Java7 stuff); Note: Need to test!
|
|\
| |
| | |
Fix For Bug 629, Plus First Crack At Associated Unit Tests
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The change to AWTNewtEventFactory appears to fix the original issue
for AWTCanvas instances, and the TestNewtEventModifiersAWTCanvas
appears to work ok too. However, there are still issues with
NewtCanvasAWT and NewtCanvasSWT instances. These might be problems
in the test code, but there's also a good chance there are still
issues in the NEWT event delivery infrastructure. For the time being
I recommend that only TestNewtEventModifiersAWTCanvas be included
in routine unit tests.
The tests are defined in TestNewtEventModifiers, and the remaining
test classes extend it to define how the window and associated
GL drawing surface are created.
File ModifierMappings.txt is simply informational, and shows how
the modifier bits are laid out between AWT and NEWT. This possibly
should have been a spreadsheet.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
GLCanvas.displayOnEDT: Also check null!=drawable
As for 1ae0737f34143a5ed655bd9c4d5fe9b0437c7774, an animator may inject a display Runnable on the EDT
before AWT destruction. In case this Runnable is executed after destruction on the EDT - it would fail.
|
| | |
| | |
| | |
| | | |
ShaderState for share ctor.
|