| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX ([R] -> [B])
Following mistakes were made in native PixelFormat
for PointerIcon and WindowIcon:
PointerIcon:
X11: RGBA8888 -> BGRA8888
OSX: BGRA8888 -> RGBA8888
WindowIcon:
OSX: BGRA8888 -> RGBA8888
Test case: TestWindowAndPointerIconNEWT
(requires visual validation)
+++
Summary:
PointerIcon:
BGRA8888: X11, Win32
RGBA8888: OSX
WindowIcon:
BGRA8888: X11, Win32
RGBA8888: OSX
+++
Reported by 'LT'
<http://forum.jogamp.org/Mac-OSX-newt-pointer-and-window-icon-displays-incorrectly-tp4033294.html>
Conflicts:
make/scripts/tests-win.bat
|
| |
|
|
|
|
| |
printGLAD in NewtCanvasAWT.setupPrint()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if Offscreen-GLAD Realization throws an Exception (Stability)
- GLDrawableFactoryImpl: createOffscreenDrawable(..) and createDummyAutoDrawable(..)
Temporary catch exception during setRealized(true) of newly created GLDrawable,
to unrealize the instance before propagating the exception.
This handling removes a memory leak in case the exception of this method is handled
and application continues to operate, e.g. as in AWTPrintLifecycle.setupPrint().
The underlying drawable gets unrealized, since it's setRealized(boolean)
implementation toggles its realize-state before delegating the realize-operation.
Hence this is functional.
- AWTPrintLifecycle.setupPrint() Stability
Catch exception thrown by factory.createOffscreenAutoDrawable(..)'s setRealize(true)
to continue operation w/ onscreen GLAD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
success - otherwise pause()/.. return value is inconsistent.
Caller of e.g. pause() running on the anim-thread or AWT-EDT (AWTAnimatorImpl)
will be non-blocking.
Before this change, a non-blocking simply did not wait until the 'hold' condition is reached
and returned its negated value.
This ofc is 'false', indicated unsuccessful operation.
Caller use the return value to determine whether the call actually paused (or ..)
the animator. Despite the non-blocking nature, the pause state was set, even if not reached.
Hence a resume() would be required to continue operation after a temporary pause.
+++
This change ignores the non-blocking nature's unmet condition.
finishLifecycleAction() returns !nok || !blocking,
i.e. either true for the reached condition (blocking) or true if non-blocking.
Blocking calls with unmet condition still return false.
+++
In case an animated GLAutoDrawableis being pulled after a non-blocking animator pause() call,
the GLAutoDrawable's implementation thread-safety must ensure proper operation.
+++
|
|
|
|
| |
complete notes in all implementations)
|
|
|
|
| |
size after creation in multiple monitor mode.
|
|
|
|
| |
GLDrawableUtil.swapGLContextAndAllGLEventListener is safe: Add Accumulator Buffer bits
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLDrawableUtil.swapGLContextAndAllGLEventListener is safe (Doesn't work w/ pre MSAA onscreen drawable)
GLDrawableUtil.isSwapGLContextSafe(..) allows user to query whether 'we think' it's safe
to utilize swapping of GLContext between GLAutoDrawable instances.
Currently known unsafe cases are:
- between on- and offscreen and one of the following:
- MSAA involved, or
- STEREO involved
Enhanced unit tests in this regard:
- TestGLContextDrawableSwitch02AWT
- using GLContextDrawableSwitchBase0
- TestGLContextDrawableSwitch02NEWT
- using GLContextDrawableSwitchBase0
Utilized safe query for setupPrint(..) action in:
- AWT GLCanvas
- AWT GLJPanel
- NewtCanvasAWT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
avoiding race conditions.
GLAutoDrawable (API CHANGE) allowing atomic operations:
- Add class API-doc chapter about 'GLAutoDrawable Locking'
- Add method invoke(..) API-doc description about throwing IllegalStateException in case of a detected deadlock situation ahead
(Note: Implemented in GLDrawableHelper.invoke(..) for all implementations)
- Add new methods for proper multithread handling:
- public RecursiveLock getUpstreamLock();
- public boolean isThreadGLCapable();
+++
GLEventListenerState/GLDrawableUtil:
- Perform operation in a atomic fashion,
i.e. lock GLAutoDrawable during whole operations:
- GLDrawableUtil.swapGLContext(..)
- GLDrawableUtil.swapGLContextAndAllGLEventListener(..)
- GLEventListenerState.moveFrom(..)
- GLEventListenerState.moveTo(..)
- ReshapeGLEventListener:
- Moved from GLEventListenerState.ReshapeGLEventListener -> GLDrawableUtil.ReshapeGLEventListener
- Takes 'displayAfterReshape' case into account.
+++
javax.media.opengl.Threading Clarifications:
- Public 'enum Mode', i.e. Threading.Mode
- Public getMode()
- Clarified 'isOpenGLThread()':
- Take 'singleThreaded' into account directly,
i.e. always return 'true' if singleThreaded == false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed Deprecated Class:
- com/jogamp/opengl/util/TGAWriter.java
- Use TextureIO w/ .tga suffix
- com/jogamp/opengl/util/awt/Screenshot.java
- Use:
- com.jogamp.opengl.util.GLReadBufferUtil, or
- com.jogamp.opengl.util.awt.AWTGLReadBufferUtil
The latter for reading into AWT BufferedImage
See: TestBug461FBOSupersamplingSwingAWT, TestBug605FlippedImageAWT
- javax/media/opengl/GLPbuffer.java
- Use:
caps.setPBuffer(true);
final GLAutoDrawable pbuffer = GLDrawableFactory.getFactory( caps.getGLProfile() ).createOffscreenAutoDrawable(null, caps, null, 512, 512);
- See: TestPBufferDeadlockAWT, ..
Removed Deprecated Methods:
- Constructor of AWT-GLCanvas, SWT-GLCanvas, AWT-GLJPanel
with argument 'final GLContext shareWith'
See GLSharedContextSetter, i.e. glCanvas.setSharedContext(..) !
- GLDrawableFactory.createOffscreenAutoDrawable(..)
with argument 'final GLContext shareWith'
See GLSharedContextSetter, i.e. offscreenAutoDrawable.setSharedContext(..) !
- GLDrawableFactory.createGLPbuffer(..),
see above!
- com.jogamp.opengl.util.av.AudioSink 'enqueueData(AudioDataFrame audioDataFrame)',
use 'enqueueData(int, ByteBuffer, int)'
- GLSharedContextSetter.areAllGLEventListenerInitialized(),
migrated to GLAutoDrawable !
- GLBase's
- glGetBoundBuffer(int), use getBoundBuffer(int)
- glGetBufferSize(int), use getBufferStorage(int).getSize()
- glIsVBOArrayBound(), use isVBOArrayBound()
- glIsVBOElementArrayBound(), use isVBOElementArrayBound()
- NEWT MouseEvent.BUTTON_NUMBER, use BUTTON_COUNT
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DisplayImpl.runOnEDTIfAvail(..) issues EDTUtil.start()
while holding it's object-lock - if the EDT is not running,
then invokes the given task.
EDTUtil.start() impl. holds it's own edt-lock
while starting, then releases it's edt-lock while issuing a null-task.
If another thread injects a blocking task right in-between
which also acquires the display's object-lock it deadlocks.
Simply remove issuing the null-task, so EDTUtil.start()
can return immediatly (releasing edt-lock)
and allowing DisplayImpl.runOnEDTIfAvail(..)
also to release it's object-lock.
The other threads task then can be executed,
where the 'starting task' would come second - which is OK,
even though a rare occasion.
Above situation was triggered via AWT/NEWT reparenting w/ forced recreation
via TestParenting01dAWT.
+++
The null-task at EDTUtil.start() was remaining code to ensure
that the EDT completed starting, which is redundant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
surface DPI ; Add NEWT Window.getPixelsPerMM(..) to query surface DPI
With HiDPI and surface scale, we need knowledge of the native surface's pixel-scale
matching the monitor's pixel-per-millimeter value.
Preserving the queried native pixel-scale and exposing it via
ScalableSurface.getNativeSurfaceScale(..) to compute surface DPI.
Add NEWT Window.getPixelsPerMM(..) to query surface DPI.
Surface DPI is demonstrated in GraphUI's GPUUISceneGLListener0A .. and TestRulerNEWT01, etc ..
|
|
|
|
|
|
|
|
| |
Remove HiDPI pixel- from/to window-unit conversion and getter methods:
Rectangle HiDPI pixel- from/to window-units are erroneous in case of multiple monitor setup where a mixed pixel-scale exist,
since the methods didn't take the monitor viewport and each of it's pixel-scale into account (expensive).
Remove deprecated reparentWindow(..) methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entry, fixed NewtCanvasAWT use-case
We require the requested pixelScale in NewtCanvasAWT if the NEWT window (child)
is not yet realized, so the JAWTWindow can receive the request,
since realized/current pixelScale is still 1.
Remove return value (requested pixel scale):
- public int[] setSurfaceScale(final int[] result, final int[] pixelScale);
+ public void setSurfaceScale(final int[] pixelScale);
Add API hook to query requested pixel scale:
+ int[] getRequestedSurfaceScale(final int[] result);
Unique name for get[Current]*:
- public int[] getSurfaceScale(final int[] result);
+ public int[] getCurrentSurfaceScale(final int[] result);
|
|
|
|
|
|
|
|
|
|
|
|
| |
which also fixed JAWTWindow getSurfaceScale() issue on Windows
Let setSurfaceScale(..) return the validated requested values
and getSurfaceScale(..) always the current values.
This removes complication and solves a bug w/ JAWTWindow on Windows,
where we used 'drawable' as an indicator for 'previous locked' state.
The latter is not true since on Windows 'drawable' is set to null in unlock,
getWindowHandle() should be taken instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX impl.
Add ScalableSurface interface
- To set pixelScale before and after realization
- To get pixelScale
- Implemented on:
- NEWT Window
- Generic impl. in WindowImpl
- OSX WindowDriver impl.
- Also propagetes pixelScale to parent JAWTWindow if offscreen (NewtCanvasAWT)
- AWT WindowDriver impl.
- JAWTWindow / OSXCalayer
- AWT GLCanvas
- AWT GLJPanel
- NEWTCanvasAWT:
- Propagates NEWT Window's pixelScale to underlying JAWTWindow
- WrappedSurface for pixelScale propagation
using offscreen drawables, i.e. GLJPanel
- Generic helper in SurfaceScaleUtils (nativewindow package)
- Fully implemented on OSX
- Capable to switch pixelScale before realization,
i.e. native-creation, as well as on-the-fly.
- Impl. uses int[2] for pixelScale to support
non-uniform scale.
Test cases:
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT
- Press 'x' to toggle HiDPI
- Commandline '-pixelScale <value>'
- Added basic auto unit test (setting pre-realization)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow; [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion
- Add new NativeSurfaceHolder interface to GLDrawable and NativeWindow, allowing NativeSurface access (pixel unit conversion)
A NativeSurfaceHolder is e.g.:
- NativeWindow (is-a)
- NEWT [GL]Window
- GLDrawable (has-a)
- [AWT|SWT]GLCanvas
- [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion
|
|
|
|
|
|
|
|
|
|
| |
API doc
Simplify event processing of NEWT's AWTAdapter:
- enqueueEvent -> processEvent
- add return value (new enum) determinating action
Using processEvent(..) now reduces manual invocation of NEWT Window.enqeueEvent(..).
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow, i.e. getWindow[Width|Height]() -> get[Width|Height]()
We have distinguished pixel- and window units in commit f9a00b91dcd146c72a50237b62270f33bd0da98e
and introduced NativeWindow.getWindow[Width|Height]() and NativeSurface.getSurface[Width|Height]().
To have a unique naming scheme, we could rename all method using 'Window',
but for simplicity and since there will be no 'semantic override'
just use the simple version.
|
|
|
|
| |
valid SWT thread (OSX: on main-thread); unclutter updatePosSizeCheck(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NEWT Support / Fix JAWT getPixelScale deadlock
- NativeWindow/Surface/NEWT API DOC: Define Coordinate System of Window and Screen
- OSXUtil: Add getPixelScale(..) via Screen index and 'windowOrView'
- JAWTWindow/JAWTUtil.getPixelScale(..): Use pre-fetched AWT GraphicsConfiguration to solve AWT-TreeLock (deadlock)
- [Virtual] Viewport of MonitorDevice and Screen:
- Properly calculate and expose [virtual] viewport in window and pixel units
- OSX Monitor viewports in pixel units are 'reconstructed'
- Window/Viewport to Monitor selection shall be perfomed via window units (unique)
- OSX NEWT Window create/init (native): Use given size and coordinates even in fullscreen mode
Don't override by quering NSScreen coordinates, trust given values.
- Fix test cases, i.e. usage of pixel- and window-units
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refine commit fb57c652fee6be133990cd7afbbd2fdfc084afaa
- NEWT Screen, Monitor, MonitorMode, ..
- All Units are in pixel units, not window units!
- On OSX HiDPI, we report the current scaled monitor resolution,
instead of the native pixel sized.
Need to filter out those, i.e. report only native unscaled resolutions,
since out MonitorMode analogy is per MonitorDevice and not per window!
- Fix usage (one by one) of
- Screen and Monitor viewport usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refine commit f9a00b91dcd146c72a50237b62270f33bd0da98e
- Using comment tag 'FIXME HiDPI' to locate remaining issues
- Fix remaining 'getPixel*(..)' -> 'getSurface*(..)'
- UpstreamSurfaceHook
- Fix usage (one by one) of
- NativeWindow: getWindowWidth() / getWindowHeight()
- NativeSurface/GLDrawable: getSurfaceWidth() / getSurfaceHeight()
- mention window- or pixel units in API doc where required
- use 'setSurfaceSize(..)' where appropriate to match 'getSurface*()'
- GLFBODrawable
- GLOffscreenAutoDrawable
- UpstreamSurfaceHook.MutableSize
- NativeWindow's Point: Add API doc and 'Point scaleInv(..)'
- NativeSurface
Simplify new conversion methods and use single in-place storage
- 'int[] getWindowUnitXY(int[], int[])' -> 'int[] convertToWindowUnits(int[], int[])'
- 'int[] getPixelUnitXY(int[], int[])' -> 'int[] convertToPixelUnits(int[], int[])'
- NEWT Screen/Monitor
- Assume screen/window units
- TODO: Refine semantics - Monitor resolution probably is in pixel units ?!
- Including the Rectangle/Monitor association etc etc
- NEWT Window
- Add setSurfaceSize(..) for convenience
- Add 'Point convertToWindowUnits(final Point pixelUnitsAndResult)', etc ..
- All window ops are using window units (size, pos, ..),
but methods operating on the surface/drawable: windowRepaint(..) ..
- TODO: Consider changing method names 'window*(..)' to 'surface*(..)'
actually operating on surface/drawable
- Window.windowRepaint(..)
- GLAutoDrawableDelegate.windowResizedOp(..) (maybe all similar methods in here)
- NEWT Mouse/Pointer Events
- Using pixel units
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add HiDPI for AWT GLCanvas w/ OSX CALayer
Core API Change:
To support HiDPI thoroughly in JOGL (NativeWindow, JOGL, NEWT)
we need to separate window- and pixel units.
NativeWindow and NativeSurface now have distinguished
access methods for window units and pixel units.
NativeWindow: Using window units
- getWindowWidth() * NEW Method *
- getWindowHeight() * NEW Method *
- getX(), getY(), ...
NativeSurface: Using pixel units
- getWidth() -> getSurfaceWidth() * RENAMED *
- getHeight() -> getSurfaceHeight() * RENAMED *
GLDrawable: Using pixel units
- getWidth() -> getSurfaceWidth() * RENAMED, aligned w/ NativeSurface *
- getHeight() -> getSurfaceHeight() * RENAMED, aligned w/ NativeSurface *
Above changes also removes API collision w/ other windowing TK,
e.g. AWT's getWidth()/getHeight() in GLCanvas
and the same method names in GLDrawable before this change.
+++
Now preliminary 'working':
- AWT GLCanvas
- AWT GLJPanel
Tested manually on OSX w/ and w/o HiDPI Retina:
java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT -manual -noanim -time 1000000
java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT -manual -noanim -time 1000000
+++
TODO:
- NEWT
- Change Window.setSize(..) to use pixel units ?
- OSX HiDPI support
- Testing ..
- API refinement
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use proper pointerId >= 0
In case of single-pointer mouse events, always use pointerId 0,
don't derive from button name.
Multiple pointer events still derive button name from the 'action' pointerId.
This allows applications to utilize pointerId equally for single and multiple
pointer events.
Passed all 'junit.run.newt.event' unit tests
|
|
|
|
| |
to GestureHandler
|
| |
|
| |
|
|
|
|
| |
pixels-per-millimeter (Requires manual Conversion to dpi)
|
|
|
|
| |
WindowImpl comment
|
|\ |
|
| |
| |
| | |
in bug https://jogamp.org/bugzilla/show_bug.cgi?id=969
|
|/
|
|
|
|
|
|
|
|
| |
(which disables print if !isShowing())
Commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651
uses 'isShowing' state to determine whether to display or not.
It also uses 'isShowing' instead of 'isVisible' for printing,
which is a regression, since not showing elements offscreen shall be able to be printed.
|
|
|
|
| |
SurfaceUpdatedListener: Mark methods final, use volatile 'isEmpty' to bail out early @ surfaceUpdated.
|
| |
|
|
|
|
| |
window.
|
|
|
|
| |
back to top-level ctor if parentWindow is null
|
|
|
|
|
|
| |
- Adding 'plugin3-public' jar and sources for Applet3 support, copied from icedtea-web3
- Added com.jogamp.newt.util.applet.JOGLNewtApplet3Run capable to run Applet3
|
|
|
|
| |
displayConnection string and screen-idx)
|
| |
|
|
|
|
|
|
| |
BE's 'grey', which is used for the filename
Same as 42d3b31d1becd8eb8e2847c87e14e47e15e730cd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplify JAWTComponentListener's HierarchyListener:
- Don't interfere w/ Component's visibility anymore!
This shall reduce sideeffects.
Utilize 'isShowing' in each Component specialization, i.e. GLCanvas.
- On SHOWING_CHANGED if a parent caused a change
of the tracked components showing state,
propagate it to the offscreen-layer!
- Remove all other complicated states!
GLCanvas, GLJPanel:
- Instead of 'isVisible()' use 'showing state',
since only the 'showing state' reflects 'true' visibility
throughout the hierarchy.
- Add HierarchyListener and track volatile showing state
to be used instead of 'isVisible'.
Using a cached showing state is more efficient
than quering 'isShowing()' all the time!
NewtCanvasAWT:
- Use 'isShowing()' instead of 'isVisible(), see above
|
|
|
|
| |
.. shameless inspired by KDE's Oxgen scheme .. (they are best)
|