Jogamp
jogl.git
4 years agoBug 741 HiDPI: Simplify ScalableSurface (2): Add request pixelScale API entry, fixed...
Sven Gothel [Sun, 8 Jun 2014 16:04:51 +0000 (18:04 +0200)]
Bug 741 HiDPI: Simplify ScalableSurface (2): Add request pixelScale API 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);

4 years agoBug 741 HiDPI: Simplify ScalableSurface [set|get]SurfaceScale(..) spec, which also...
Sven Gothel [Sun, 8 Jun 2014 13:57:53 +0000 (15:57 +0200)]
Bug 741 HiDPI: Simplify ScalableSurface [set|get]SurfaceScale(..) spec, 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.

4 years agoBug 741 HiDPI: Add ScalableSurface interface to get/set pixelScale w/ full OSX impl.
Sven Gothel [Sun, 8 Jun 2014 06:11:57 +0000 (08:11 +0200)]
Bug 741 HiDPI: Add ScalableSurface interface to get/set pixelScale w/ full 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)

4 years agoMinor: API-Doc / DEBUG Typo, GDISurface: Make fields private
Sven Gothel [Sun, 8 Jun 2014 05:24:43 +0000 (07:24 +0200)]
Minor: API-Doc / DEBUG Typo, GDISurface: Make fields private

4 years agoUpstreamSurfaceHook: Add 'NativeSurface getUpstreamSurface()' (from EGLUpstreamSurfac...
Sven Gothel [Sun, 8 Jun 2014 05:23:14 +0000 (07:23 +0200)]
UpstreamSurfaceHook: Add 'NativeSurface getUpstreamSurface()' (from EGLUpstreamSurfaceHook) to generalize ProxySurfaceImpl.getUpstreamSurface()

4 years agoBug 741 HiDPI: Add new NativeSurfaceHolder interface to GLDrawable and NativeWindow...
Sven Gothel [Fri, 6 Jun 2014 10:51:45 +0000 (12:51 +0200)]
Bug 741 HiDPI: Add new NativeSurfaceHolder interface to GLDrawable and 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

4 years agoNEWT AWTAdapter: Simplify event processing / Window.enqueueEvent(..): Add API doc
Sven Gothel [Thu, 5 Jun 2014 17:28:17 +0000 (19:28 +0200)]
NEWT AWTAdapter: Simplify event processing / Window.enqueueEvent(..): Add 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(..).

4 years agoBug 741 HiDPI: Fix missing window -> pixel unit conversion in AWTNewtEventFactory...
Sven Gothel [Tue, 27 May 2014 22:50:59 +0000 (00:50 +0200)]
Bug 741 HiDPI: Fix missing window -> pixel unit conversion in AWTNewtEventFactory of commit 8b255eb303bba045b4eb087da1d1cb33b2e89e96

4 years agoGraphUI: Fix label layout (absolute), add auto no-aa dpi threshold (200 dpi), add...
Sven Gothel [Tue, 27 May 2014 21:45:52 +0000 (23:45 +0200)]
GraphUI: Fix label layout (absolute), add auto no-aa dpi threshold (200 dpi), add all modes to applet test-page

4 years agoBug 741 HiDPI: Add missing window -> pixel unit conversion in AWTNewtEventFactory...
Sven Gothel [Tue, 27 May 2014 18:20:40 +0000 (20:20 +0200)]
Bug 741 HiDPI: Add missing window -> pixel unit conversion in AWTNewtEventFactory (e.g. for NewtCanvasAWT)

4 years agoBug 741 HiDPI: Fix OSX NEWT Offscreen Size Regression from commit 56d60b36798fa8dae48...
Sven Gothel [Tue, 27 May 2014 17:56:43 +0000 (19:56 +0200)]
Bug 741 HiDPI: Fix OSX NEWT Offscreen Size Regression from commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1

Fix regression of commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1:
  createWindow(..) was issuing sizeChanged(..) to ensure size notification,
  however - the offscreen case used the dummy size 64x64.

  Fix issues the notifications in caller w/ true size.

4 years agoBug 741 HiDPI: Fix regression MIN_MONITOR_DEVICE_PROPERTIES: Adding missing 'Rotated...
Sven Gothel [Tue, 27 May 2014 01:55:38 +0000 (03:55 +0200)]
Bug 741 HiDPI: Fix regression MIN_MONITOR_DEVICE_PROPERTIES: Adding missing 'Rotated Viewport window-units' / Refine API doc in MonitorModeProps

Regression of commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1

4 years agoBug 741 HiDPI: [Core API Change] Bring back get[Width|Height]() in NativeWindow,...
Sven Gothel [Mon, 26 May 2014 22:05:17 +0000 (00:05 +0200)]
Bug 741 HiDPI: [Core API Change] Bring back get[Width|Height]() in 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.

4 years agoNewtCanvasSWT: Fixe newtChild NPE; Perform getParentLocationOnScreen() on valid SWT...
Sven Gothel [Mon, 26 May 2014 17:20:03 +0000 (19:20 +0200)]
NewtCanvasSWT: Fixe newtChild NPE; Perform getParentLocationOnScreen() on valid SWT thread (OSX: on main-thread); unclutter updatePosSizeCheck(..)

4 years agoBug 1010 - Fix ES3.glPixelStorei and revalidate GLPixelStorageModes
Sven Gothel [Mon, 26 May 2014 17:18:43 +0000 (19:18 +0200)]
Bug 1010 - Fix ES3.glPixelStorei and revalidate GLPixelStorageModes

Remove GLES3Impl.glPixelStorei pname validation which was true for ES2 impl,
but is no more valid for ES3, which accepts more values than
GL_PACK_ALIGNMENT & GL_UNPACK_ALIGNMENT.

Revalidate GLPixelStorageModes:
  - Properly support ES3 PixelStorageModes
  - Revalidate PixelStorageModes for all GL profiles
  - Properly reset values at save
  - Separate PACK and UNPACK save/reset/restore implementation

4 years agoBug 1009: Refine test case (Add test06_GL3_Demo0Normal)
Sven Gothel [Mon, 26 May 2014 17:16:52 +0000 (19:16 +0200)]
Bug 1009: Refine test case (Add test06_GL3_Demo0Normal)

4 years agoBug 1009: Make FBObject's sampling sink format compatible w/ sampling source if possi...
Sven Gothel [Mon, 26 May 2014 17:15:42 +0000 (19:15 +0200)]
Bug 1009: Make FBObject's sampling sink format compatible w/ sampling source if possible (ES3 spec requirement)

Make FBObject's sampling sink format compatible w/ sampling source if possible,
i.e. for all GL profiles but ES1 and ES2.

This is an ES3 spec requirement:

For ES3, sampling-sink colorbuffer format must be equal w/
the sampling-source Colorbuffer.

ES3 BlitFramebuffer Requirements: OpenGL ES 3.0.2 p194: 4.3.2  Copying Pixels:

  If SAMPLE_BUFFERS for the read framebuffer is greater than zero, no copy
  is performed and an INVALID_OPERATION error is generated if the formats of
  the read and draw framebuffers are not identical or if the source and destination
  rectangles are not defined with the same (X0, Y 0) and (X1, Y 1) bounds.

Texture and Renderbuffer format details:

ES2 Base iFormat: OpenGL ES 2.0.24 p66: 3.7.1 Texture Image Specification, Table 3.8
 - ALPHA, LUMINANCE, LUMINANCE_ALPHA, RGB, RGBA

ES3 Base iFormat: OpenGL ES 3.0.2 p125: 3.8.3 Texture Image Specification, Table 3.11
 - ALPHA, LUMINANCE, LUMINANCE_ALPHA, RGB, RGBA
   DEPTH_COMPONENT, STENCIL_COMPONENT, RED, RG

ES3 Required Texture and Renderbuffer iFormat: OpenGL ES 3.0.2 p126: 3.8.3 Texture Image Specification
 - RGBA32I, RGBA32UI, RGBA16I, RGBA16UI, RGBA8, RGBA8I,
   RGBA8UI, SRGB8_ALPHA8, RGB10_A2, RGB10_A2UI, RGBA4, and
   RGB5_A1.
 - RGB8 and RGB565.
 - RG32I, RG32UI, RG16I, RG16UI, RG8, RG8I, and RG8UI.
 - R32I, R32UI, R16I, R16UI, R8, R8I, and R8UI.

+++

Our implementation shall attempt to use the same format
for the sampling-source and -sink
wherever possible, e.g. GL2ES3 (excluding ES1 and ES2)!

4 years agoBug 1013: Fix switching monitor resolution for NEWT Window (content black after)...
Sven Gothel [Mon, 26 May 2014 17:11:39 +0000 (19:11 +0200)]
Bug 1013: Fix switching monitor resolution for NEWT Window (content black after) / Bug 741 HiDPI: Update pixelScale after monitor mode change

This seems to be a bug within QUARTZ .. hence this is a workaround

Monitor-Mode-Changed Notification:
  - In case the window is not in fullscreen,
    render it temporary invisible until the mode change is completed.

  - Also update the HiDPI pixel-scale when the mode change is completed.

4 years agoBug 1012: Fix erroneous handling of multiple monitor coordinates on OSX with NEWT
Sven Gothel [Mon, 26 May 2014 17:04:41 +0000 (19:04 +0200)]
Bug 1012: Fix erroneous handling of multiple monitor coordinates on OSX with NEWT

To properly convert Top-Left (TL) from/to Bottom-Left (BL) coordinates
we need to utilize the given CGDisplay viewport (TL)
and NSScreen (BL) to perform the y-flip.

This is especially true for the case of having multiple monitors
covering different viewports (mixed resolution).

4 years agoBug 741 HiDPI: Refine Monitor/Screen [virtual] Viewport Definition / Add NEWT Support...
Sven Gothel [Mon, 26 May 2014 16:54:27 +0000 (18:54 +0200)]
Bug 741 HiDPI: Refine Monitor/Screen [virtual] Viewport Definition / Add 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

4 years agoBug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: Refine...
Sven Gothel [Thu, 22 May 2014 22:00:48 +0000 (00:00 +0200)]
Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-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

4 years agoBug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: Refine...
Sven Gothel [Thu, 22 May 2014 05:09:23 +0000 (07:09 +0200)]
Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: 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

4 years agoBug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units; Add HiDPI...
Sven Gothel [Wed, 21 May 2014 06:53:54 +0000 (08:53 +0200)]
Bug 742 HiDPI: [Core API Change] Distinguish window-units and 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

4 years agoBug 742 HiDPI: Add prelim HiDPI support to GLJPanel w/o API change and w/o fixing...
Sven Gothel [Tue, 20 May 2014 19:01:21 +0000 (21:01 +0200)]
Bug 742 HiDPI: Add prelim HiDPI support to GLJPanel w/o API change and w/o fixing AWTPrintLifecycle DPI evaluation

We also have to re-validating AWTPrintLifecycle's DPI semantics,
since we currently are based on pixel dimension w/ 72 dpi!

4 years agoBug 742 HiDPI: Add access to private HiDPI in AWT pixelScale value in JAWTUtil and...
Sven Gothel [Tue, 20 May 2014 18:58:40 +0000 (20:58 +0200)]
Bug 742 HiDPI: Add access to private HiDPI in AWT pixelScale value in JAWTUtil and JAWTWindow

4 years agoGLMediaPlayerImpl: Change access of most fields to private for clarity and API stability
Sven Gothel [Mon, 19 May 2014 23:06:28 +0000 (01:06 +0200)]
GLMediaPlayerImpl: Change access of most fields to private for clarity and API stability

4 years agoBug 801: Refine commit 9a15aad0e5388a4b927e44d3d2ce136f32474bc2 cache TextureSequence...
Sven Gothel [Mon, 19 May 2014 23:02:27 +0000 (01:02 +0200)]
Bug 801: Refine commit 9a15aad0e5388a4b927e44d3d2ce136f32474bc2 cache TextureSequence's fragment shader hash-code

Adding TextureSequence.getTextureFragmentShaderHashCode() allowing to use a cached hash-code (performance, interface usability).

Implemented in GLMediaPlayerImpl and ImageSequence.

4 years agoExtract FFMPEGNatives's Audio + Video formats to their own class in AV private package.
Sven Gothel [Mon, 19 May 2014 21:41:31 +0000 (23:41 +0200)]
Extract FFMPEGNatives's Audio + Video formats to their own class in AV private package.

jogamp.opengl.util.av.impl.FFMPEGNatives.SampleFormat -> jogamp.opengl.util.av.AudioSampleFormat
jogamp.opengl.util.av.impl.FFMPEGNatives.PixelFormat -> jogamp.opengl.util.av.VideoPixelFormat

.. to be reused for other decoders later-on.

4 years agoBug 801: Fix RegionRenderer's TextureSequence shader program selection (recognize...
Sven Gothel [Mon, 19 May 2014 21:38:37 +0000 (23:38 +0200)]
Bug 801: Fix RegionRenderer's TextureSequence shader program selection (recognize diff. TextureLookupFragmentShader and TextureSampler2DType)

Fix RegionRenderer's TextureSequence shader program selection,
i.e. TextureLookupFragmentShader and TextureSampler2DType are considered in the ShaderProgram hash key selector.

Now the proper ShaderProgram for different TextureSequence objects will be selected,
e.g. diff video pixel formats and/or texture sampler types.

4 years agoBug 801: Split GraphUI's TextureButton: TextureSeqButton (Base) and it's derivations...
Sven Gothel [Mon, 19 May 2014 21:35:06 +0000 (23:35 +0200)]
Bug 801: Split GraphUI's TextureButton: TextureSeqButton (Base) and it's derivations ImageSeqButton + GLEventListenerButton + MediaPlayerButton

Split GraphUI's TextureButton to TextureSeqButton (Base) and it's derivations:
 - ImageSeqButton
   - displays an ImageSequence

 - GLEventListenerButton
   - displays any GLEventListener as rendered into FBO as an ImageSequence

 - MediaPlayerButton
   - displays movies

- Added public ImageSequence impl. TextureSequence,
  was private SingleTextureSeqFrame.

- Demo GPUUISceneGLListener0A shows:
  - MediaPlayerButton w/ Big Buck Bunny film
  - GLEventListenerButton w/ GearsES2
  - ImageSeqButton w/ 2 textures (pressed/released)

4 years agoMinor edits: Fix comments / API-docs
Sven Gothel [Mon, 19 May 2014 21:24:23 +0000 (23:24 +0200)]
Minor edits: Fix comments / API-docs

4 years agoTexture/TextureIO: Make 'wrapping' Texture ctor public, remove same factory method...
Sven Gothel [Mon, 19 May 2014 21:22:49 +0000 (23:22 +0200)]
Texture/TextureIO: Make 'wrapping' Texture ctor public, remove same factory method from TextureIO

4 years agoTestVersionSemanticsNOUI: Derive from JunitTracer
Sven Gothel [Tue, 13 May 2014 23:22:27 +0000 (01:22 +0200)]
TestVersionSemanticsNOUI: Derive from JunitTracer

4 years agoUnit Test: Added Semantic Version Test (Current version agains v2.1.5)
Sven Gothel [Tue, 13 May 2014 14:46:38 +0000 (16:46 +0200)]
Unit Test: Added Semantic Version Test (Current version agains v2.1.5)

See GlueGen commits:
  - c06288d2a12586ab8df3715cf130549fdd7499fb
  - 64615f17a8c63f692159235e169dbdd14d30b737
  - 1a504fa682e6f28c5543da4d5885c7f2ff4ed3f1

4 years agoJAWTWindow: Non intrusive workaround for Bug 1004 and providing AppContextInfo to...
Sven Gothel [Sun, 11 May 2014 23:07:34 +0000 (01:07 +0200)]
JAWTWindow: Non intrusive workaround for Bug 1004 and providing AppContextInfo to mitigate related bugs, e.g. Bug 983

Bug 1004, as well as Bug 983, are caused by issueing certain AWT tasks
from a Thread which ThreadGroup is not mapped to a valid sun.awt.AppContext (AppContext).

The 'certain AWT tasks' are all quering the current EventQueue instance,
which is associated to the AppContext.
This operation will fail and cause a NullPointerException.

This workaround simply gathers a ThreadGroup
which is mapped to the desired AppContext.

This AppContext ThreadGroup is being used to launch a new Thread
which is then mapped to an AppContext and hence can issue
all AWT commands.

+++

In the Bug 1004 scenario, JAWTWindow is constructed
from within the AWT EDT, which ThreadGroup does belong to the AppContext.

Here the issue is that an AWT operation was invoked from the OSX main thread,
which itself does not belong to the AppContext.
The workaround as described above solves this issue.

+++

For Bug 983 the scenario is different, since JAWTWindow is _not_
constructed from a thread which ThreadGroup is mapped to the AppContext.
[It is also not constructed on the AWT-EDT].

It is recommended to have Java3D gathering the AppContextInfo itself early
and issues the JAWTWindow creation on an eligible thread using
AppContextInfo.invokeOnAppContextThread(..)
similar to JAWTWindow.attachSurfaceLayer(..).

This will allow removing the more intrusive remedy
of Java3D commit bdda2ac20bfef85271da764d1989ec3434d5c67a
and simply issuing the crucial commands on a proper thread.

+++

The more intrusive workaround of above commit
does not work in general at least for Bug 1004 (OSX and Applets).
While forcing the mapping of the 'alien' thread-group
to the AppContext work for the 1st launch w/ the 1st AppContext,
a second launch w/ a new AppContext will fail.

Here we did update the new AppContext knowledge in AppContextInfo,
however a NPE is received in getEventQueue() .. since the AppContext
is gathered after patching, but the EventQueue is still null.

Further more, using static knowledge of AppContext/ThreadGroup mapping
violates at least the Applet lifecycle. Here we can have one ClassLoader
with multiple AppContext - i.e. Applets.

4 years agoAdd generic manual build script to test against distribution's default openjdk + ant
Sven Gothel [Fri, 9 May 2014 07:47:08 +0000 (09:47 +0200)]
Add generic manual build script to test against distribution's default openjdk + ant

4 years agoFFMPEGMediaPlayer / FFMPEGv10Natives: Fix libav-10 and ffmpeg-2.x version validation...
Sven Gothel [Fri, 9 May 2014 07:23:06 +0000 (09:23 +0200)]
FFMPEGMediaPlayer / FFMPEGv10Natives: Fix libav-10 and ffmpeg-2.x version validation (libavutil)

4 years agoLibav/FFMpeg: Bump headers of final version libav-10 / ffmpeg-2.2
Sven Gothel [Fri, 9 May 2014 06:45:01 +0000 (08:45 +0200)]
Libav/FFMpeg: Bump headers of final version libav-10 / ffmpeg-2.2

4 years agoFix MovieCube/MovieSimple Graph-Text Usage: Add Alpha Blending otherwise shader canno...
Sven Gothel [Fri, 9 May 2014 05:56:40 +0000 (07:56 +0200)]
Fix MovieCube/MovieSimple Graph-Text Usage: Add Alpha Blending otherwise shader cannot work properly

4 years agomanual tests: Add exp. gluegen-rt-alt.jar to 'ALT' classpath
Sven Gothel [Fri, 9 May 2014 05:54:15 +0000 (07:54 +0200)]
manual tests: Add exp. gluegen-rt-alt.jar to 'ALT' classpath

4 years agoFix some unit tests: Add ant-junit4.jar to classpath
Sven Gothel [Fri, 9 May 2014 05:53:11 +0000 (07:53 +0200)]
Fix some unit tests: Add ant-junit4.jar to classpath

4 years agoHowToBuild: ant 1.8.2 ; Complete GNU/Linux dependencies w/ openjdk, ant and p7zip...
Sven Gothel [Fri, 9 May 2014 05:51:14 +0000 (07:51 +0200)]
HowToBuild: ant 1.8.2 ; Complete GNU/Linux dependencies w/ openjdk, ant and p7zip, refine Debian 7 and 8 i386 on amd64 details

4 years agoManual test scripts: Pass classpath via '-cp' instead of env CLASSPATH
Sven Gothel [Fri, 9 May 2014 05:31:38 +0000 (07:31 +0200)]
Manual test scripts: Pass classpath via '-cp' instead of env CLASSPATH

4 years agoMerge remote-tracking branch 'hharrison2/master'
Sven Gothel [Wed, 23 Apr 2014 00:45:48 +0000 (02:45 +0200)]
Merge remote-tracking branch 'hharrison2/master'

4 years agojogl: avoid writing into an uninitialized array in nurbs code
Harvey Harrison [Fri, 11 Apr 2014 18:02:37 +0000 (11:02 -0700)]
jogl: avoid writing into an uninitialized array in nurbs code

pspec is never initialized, this would have always crashed.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
4 years agojogl: avoid bugs with sign-extension in JPEGDecoder
Harvey Harrison [Fri, 11 Apr 2014 17:58:09 +0000 (10:58 -0700)]
jogl: avoid bugs with sign-extension in JPEGDecoder

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
4 years agoReduce jar-size / cleanup: Replace 1 kB test-ntsc01-57x32.png w/ 400kB test-ntsc01...
Sven Gothel [Thu, 10 Apr 2014 04:52:16 +0000 (06:52 +0200)]
Reduce jar-size / cleanup: Replace 1 kB test-ntsc01-57x32.png w/ 400kB test-ntsc01-28x16.png asset ; Generalize TextureSequenceDemo01 -> SingleTextureSeqFrame ; Unit tests use test-data, not assets.

4 years agoBug 801: Introd. RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED hinting to deal w...
Sven Gothel [Wed, 9 Apr 2014 22:31:52 +0000 (00:31 +0200)]
Bug 801: Introd. RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED hinting to deal w/ GL_DEPTH_TEST accordingly

Fixes VBORegion2PMSAAES2 no-depth-buffer usage
and allows user to control behavior w/o quering GL state.

If BITHINT_GLOBAL_DEPTH_TEST_ENABLED set:
  - RegionRenderer.defaultBlendEnable:  glDepthMask(false)
  - RegionRenderer.defaultBlendDisable: glDepthMask(true)
  - VBORegion2PMSAAES2 enables/disables GL_DEPTH_TEST, otherwise MSAA is corrupt.

4 years agoGraphUISceneDemo Applet: Add JOAL for GLMediaPlayer usage
Sven Gothel [Wed, 9 Apr 2014 22:28:09 +0000 (00:28 +0200)]
GraphUISceneDemo Applet: Add JOAL for GLMediaPlayer usage

4 years agobuild-test.xml: Handle hs_err_pid*.log files, i.e. clean-up and archive
Sven Gothel [Wed, 9 Apr 2014 14:42:02 +0000 (16:42 +0200)]
build-test.xml: Handle hs_err_pid*.log files, i.e. clean-up and archive

4 years agoBug 801: LabelButton uses DEFAULT_2PASS_LABEL_ZOFFSET in any mode, due to disabled...
Sven Gothel [Wed, 9 Apr 2014 14:41:17 +0000 (16:41 +0200)]
Bug 801: LabelButton uses DEFAULT_2PASS_LABEL_ZOFFSET in any mode, due to disabled depth buffer in blend mode

4 years agoNEWT MouseEvent: Decouple pointerIds from single-pointer button, i.e. always use...
Sven Gothel [Wed, 9 Apr 2014 14:40:13 +0000 (16:40 +0200)]
NEWT MouseEvent: Decouple pointerIds from single-pointer button, i.e. always 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

4 years agoVectorUtil: Fix method names, i.e. use type-suffix in end of function for clarity...
Sven Gothel [Wed, 9 Apr 2014 07:25:55 +0000 (09:25 +0200)]
VectorUtil: Fix method names, i.e. use type-suffix in end of function for clarity and unique method naming

4 years agoBug 801: Region Dirty Update; TextureSequence GLMediaPlayer Fix; Blending Fix ;
Sven Gothel [Wed, 9 Apr 2014 07:09:51 +0000 (09:09 +0200)]
Bug 801: Region Dirty Update; TextureSequence GLMediaPlayer Fix; Blending Fix ;

- Region Dirty Update
  - Split dirty -> ShapeDirty + StateDirty,
    where StateDirty forces re-rendering content
    w/o geometry update as req. for 2-pass mode.

- Fix TextureSequence (GLMediaPlayer) usage in RegionRenderer / GLRegion*
  - handle GL_TEXTURE_EXTERNAL_OES incl. Android ES3 bug
  - inject TextureSequence's shader stubs
  - shader: Use abstract lookup 'texture2D' -> 'gcuTexture2D'
  - flip scaled colorTexBBox if TextureSequence 'tex.getMustFlipVertically()'

  - TODO: Handle multiple TextureSequence shader programs!

- Fix Blending: GLRegion* / RegionRenderer / RenderState
  - Disable/Enable depth-writing w/ blending
  - Region impl. sets proper glBlendFunc*(..),
    i.e. 2-pass:
      - render2FBO: glClearColor(0f, 0f, 0f, 0f)
                    glBlendFuncSeparate(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA)
      - renderFBO:  glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA)
  - User code shall not set glClearColor(..) for 2-pass anymore

- Graph-UI Demo
  - UIShape:
    - Add MouseGestureListener, combining MouseListener + GestureListener
    - EventDetails -> PointerEventInfo
    - PointerEventInfo contains objPos (ray-intersection) and glWin-pos
    - Toggle:
      - Separate color (on/off) if enabled
      - Toggle on click if enabled

  - SceneUIController
    - Use PinchToZoomGesture and propagete same gesture to UIShape

    - Use AABBox.getRayIntersection(..) using 'real' shape coordinates
      for 1st picking.

    - Use shape PMV for secondary picking (drag, zoom 2-pointer, etc),
      see windowToShapeCoords(..)

    - Sort shapes according to z-value (render: ascending; picking: descending)

    - Only 'drag' if pointerId matches 1st pressed pointer

4 years agoFix ShaderCode.insertShaderSource(..): Return 'position' if nothing has been added...
Sven Gothel [Wed, 9 Apr 2014 06:38:09 +0000 (08:38 +0200)]
Fix ShaderCode.insertShaderSource(..): Return 'position' if nothing has been added; ShaderCode.addDefaultShaderPrecision(..): Branch GLES3 before GLES2, since gles2.isGLES2() == true

4 years agoFFMPEGMediaPlayer: Use 'const' qualifier in shader stub
Sven Gothel [Wed, 9 Apr 2014 06:35:30 +0000 (08:35 +0200)]
FFMPEGMediaPlayer: Use 'const' qualifier in shader stub

4 years agoPinchToZoomGesture: Add 'delta' value [-1..1], move 'InputEvent trigger' up to Gestur...
Sven Gothel [Wed, 9 Apr 2014 06:34:50 +0000 (08:34 +0200)]
PinchToZoomGesture: Add 'delta' value [-1..1], move 'InputEvent trigger' up to GestureHandler

4 years agoAdd TextureSequence.isTextureAvailable(), allowing triggering action only when source...
Sven Gothel [Wed, 9 Apr 2014 06:33:00 +0000 (08:33 +0200)]
Add TextureSequence.isTextureAvailable(), allowing triggering action only when source becomes ready

4 years agoAdd AABBox.getRayIntersection(..), VectorUtil.line2PlaneIntersection(..) incl. getNor...
Sven Gothel [Wed, 9 Apr 2014 06:31:41 +0000 (08:31 +0200)]
Add AABBox.getRayIntersection(..), VectorUtil.line2PlaneIntersection(..) incl. getNormal*(..) and getPlane*(..)

AABBox.getRayIntersection(..) provides the intersecting coordinates,
where the fast alternative AABBox.intersectsRay(..) does not.

4 years agoFix Quaternion.rotateByEuler(..): Zero rotation shall lead to NOP instead of setting...
Sven Gothel [Wed, 9 Apr 2014 06:25:30 +0000 (08:25 +0200)]
Fix Quaternion.rotateByEuler(..): Zero rotation shall lead to NOP instead of setting identity

4 years agoNEWT Events: Use final .. (minor edit)
Sven Gothel [Sat, 5 Apr 2014 01:13:56 +0000 (03:13 +0200)]
NEWT Events: Use final .. (minor edit)

4 years agoBug 801: Fix regressions from 9c71f276d1fcc87b69b413847fd1da34b30d0932 (UIShape blend...
Sven Gothel [Fri, 4 Apr 2014 01:02:54 +0000 (03:02 +0200)]
Bug 801: Fix regressions from 9c71f276d1fcc87b69b413847fd1da34b30d0932 (UIShape blend clear-color, RegionRenderer initialized) ..

4 years agoBug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + TextureSequ...
Sven Gothel [Fri, 4 Apr 2014 00:30:00 +0000 (02:30 +0200)]
Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + TextureSequence to Region (Demo: TextureButton)

Cleanup shader-program location/data update

- GLUniformData:
  - Allow lazy data setup, as used for
    RenderState.ProgramLocal, see below

- RenderState
  - Separate data (pmv, weight, colorStatic) from
    program-local uniforms -> add class ProgramLocal.
    Reduces uniform location lookups, since
    ProgramLocal is bound to Region impl.

  - ProgramLocal.update(..) needs to write uniform data always,
    since data is being used in multiple programs!

  - No 'dirty' tracking possible, removed - see above.

- RegionRenderer
  - Fix shader-selection: 2-pass programs differ from 1-pass!
  - No shader-setup at init

+++

Add COLORTEXTURE + TextureSequence to Region
  - Create color-texture coords in vertex-shader via region's bounding box (pass-1)
  - Use color-texture unit in pass-1 if enabled (own shader program)
  - Use TextureSequence in Region impl. providing all required data (unit + texture-name)
  - Demo: TextureButton (a UIShape)

4 years agoBug 801: Reduce temp. object creation, i.e. GC load
Sven Gothel [Wed, 2 Apr 2014 17:25:16 +0000 (19:25 +0200)]
Bug 801: Reduce temp. object creation, i.e. GC load

4 years agoBug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching in shader...
Sven Gothel [Wed, 2 Apr 2014 02:41:48 +0000 (04:41 +0200)]
Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching in shader; Update attributes and uniforms manually, drop ShaderState;

- Due to shader-switching,
  'renderModes' are now local to Region, e.g. UIShape etc

- Remove RegionRenderer.renderModes

- VBORegion2P*:
  - Use simple 2x float matrix for orthogonal P+Mv

- Cleanup shader

4 years agoMerge branch 'master' into graph-wip
Sven Gothel [Tue, 1 Apr 2014 14:46:29 +0000 (16:46 +0200)]
Merge branch 'master' into graph-wip

4 years agoX11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ withinGLVersionsMapping...
Sven Gothel [Tue, 1 Apr 2014 14:43:59 +0000 (16:43 +0200)]
X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ withinGLVersionsMapping:=true if null == sharedContext

.. otherwise no quirk could be set on non ARB ctx GL implementations.

null == sharedContext, always for first context creation, i.e. indeed within GL version mapping.

4 years agoCleanup *GraphicsDevice: Use 'final' for ctor parameter; DefaultGraphicsDevice.getUni...
Sven Gothel [Tue, 1 Apr 2014 14:34:41 +0000 (16:34 +0200)]
Cleanup *GraphicsDevice: Use 'final' for ctor parameter; DefaultGraphicsDevice.getUniqueID(..) shall perform 'intern()' only once.

4 years agoBug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching in shader...
Sven Gothel [Tue, 1 Apr 2014 14:31:05 +0000 (16:31 +0200)]
Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching in shader; Update attributes and uniforms manually, drop ShaderState;

- ShaderCode
  - add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path)
  - insertShaderSource(..): pos==-1 -> append code

- VectorUtil
  - add isVec3InTriangle3(..., float epsilon)
  - add testSeg2SegIntersection(..., float epsilon)
  - add testTri2SegIntersection(..., float epsilon)

- AffineTransform: Return result for chaining

- Font
  - Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)'
  - Rename getString*() -> getMetric*()
  - OTGlyph: Release _points field, no more used
  -

- Graph Triangulation
  - Count additional vertices in: Triangulator, CDTriangulator2D

- OutlineShape:
  - Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging
    OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()'

  - Clarify cleanup ot outlines in same method 'cleanupOutlines()'

  - Count additional vertices ..

- Graph Shader:
  - Start splitting and segmenting shader code for:
    - pass1 / pass2
    - features, i.e. sampleCont, color-channel, ..

4 years agoDemos MovieCube/Simple: Update video URLs .. since download.blender.org seems to...
Sven Gothel [Wed, 26 Mar 2014 12:20:00 +0000 (13:20 +0100)]
Demos MovieCube/Simple: Update video URLs .. since download.blender.org seems to be down / Use h264 stream for 'desktop' as well

4 years agoMovieCube/Simple on Android/GLES: Cache FPS Region (updated only each second) to...
Sven Gothel [Wed, 26 Mar 2014 10:07:21 +0000 (11:07 +0100)]
MovieCube/Simple on Android/GLES: Cache FPS Region (updated only each second) to mitigate low-performance (update is CPU bound)

4 years agoFix test applets: GraphTextDemo (No MSAA, add VBAA def. ctor GPUTextGLListener0A...
Sven Gothel [Wed, 26 Mar 2014 09:38:28 +0000 (10:38 +0100)]
Fix test applets: GraphTextDemo (No MSAA, add VBAA def. ctor GPUTextGLListener0A); MovieCube (Size 800x600)

4 years agoBug 801: Adjust Tests: GPUUIScene* use window proportional button size; Add Android...
Sven Gothel [Tue, 25 Mar 2014 22:55:39 +0000 (23:55 +0100)]
Bug 801: Adjust Tests: GPUUIScene* use window proportional button size; Add Android MovieCubeActivity0a for 'no text' version

4 years agoBug 801: Graph OpenGL ES2 and ES3 Compatibility
Sven Gothel [Tue, 25 Mar 2014 15:39:18 +0000 (16:39 +0100)]
Bug 801: Graph OpenGL ES2 and ES3 Compatibility

- Remove 'const' qualifier in shader graph code for non 'absolute' const values

- Use extension directive OES_standard_derivatives only for ES2.0, not ES3.0 (graph shader)

- Compare float w/ float literals, not int literals!

- Android Demo NEWTGraphUI2pActivity:
  - Is a VBAA example, hence disable scene MSAA!

4 years agoBug 801: Use allsamples 'brute force' for VBAA (best quality) ; Demos: Reduce text...
Sven Gothel [Tue, 25 Mar 2014 14:49:42 +0000 (15:49 +0100)]
Bug 801: Use allsamples 'brute force' for VBAA (best quality) ; Demos: Reduce text contrast by 1/10th allowing better AA ; GPUUISceneGLListener0A uses proportional window height font size and one label w/ 10pt

4 years agoTypecastRenderer: Validate Shape Generation - Result: OK
Sven Gothel [Tue, 25 Mar 2014 13:22:02 +0000 (14:22 +0100)]
TypecastRenderer: Validate Shape Generation - Result: OK

4 years agoShaderCode: Allow 'srcRoot' to be optional ; RegionRendererImpl01: Allos custom shader
Sven Gothel [Tue, 25 Mar 2014 05:41:21 +0000 (06:41 +0100)]
ShaderCode: Allow 'srcRoot' to be optional ; RegionRendererImpl01: Allos custom shader

4 years agoBug 801: Elaborate on multisampling performance/quality: Flipquad, RGSS, Quincunx
Sven Gothel [Tue, 25 Mar 2014 05:40:08 +0000 (06:40 +0100)]
Bug 801: Elaborate on multisampling performance/quality: Flipquad, RGSS, Quincunx

Using poles only as sampling points is not as effective as: flipquad > rgss >> quincunx

Best quality would be 'wholeedge', i.e. average every supersample,
however performance is worse here.

References:
  <http://fileadmin.cs.lth.se/graphics/research/papers/inexp_ms2005/>
  <http://fileadmin.cs.lth.se/graphics/research/papers/masses2003/>

4 years agoBug 801: Revise Graph VBAA (Add border dropping MSAA; Test diff. AA modes incl. FXAA2...
Sven Gothel [Sat, 22 Mar 2014 05:23:50 +0000 (06:23 +0100)]
Bug 801: Revise Graph VBAA (Add border dropping MSAA; Test diff. AA modes incl. FXAA2) ; Test exp. LineAA ; Misc Changes

- Revise VBAA
  - Add border to FBO dropping MSAA
    - This automatically gives AA for edges on FBO boundary

  - Correcting ceil-diff, use object-diff instead of win-diff (diff := ceil(a)-a, w/ float a)

  - Reorg shader - using includes to test diff. AA modes:
    - [poles, wholeedge] * [equalweight, propweight]
    - fxaa2

- Exp. LineAA (disabled)
  - Test ROESSLER-2012-OGLES for detected rectangles only
  - Test boundary line detection

See screenshots: <http://jogamp.org/files/screenshots/graphui/20140322/>

4 years agoGLRendererQuirks.NoMultiSamplingBuffers: Prelim detection of this quirk due to Galliu...
Sven Gothel [Wed, 19 Mar 2014 21:35:52 +0000 (22:35 +0100)]
GLRendererQuirks.NoMultiSamplingBuffers: Prelim detection of this quirk due to Gallium/Nouveau Driver (TODO: Handle it in GLCapabilities Selection)

4 years agoAdding missing jogl-applet-runner-newt-GraphUISceneDemo03-napplet.html (Now testing...
Sven Gothel [Mon, 17 Mar 2014 23:08:18 +0000 (00:08 +0100)]
Adding missing jogl-applet-runner-newt-GraphUISceneDemo03-napplet.html (Now testing all 3: MSAA, VBAA, VBAA+MSAA)

4 years agoAdding missing jogl-applet-runner-newt-GraphUISceneDemo02-napplet.html
Sven Gothel [Mon, 17 Mar 2014 22:57:23 +0000 (23:57 +0100)]
Adding missing jogl-applet-runner-newt-GraphUISceneDemo02-napplet.html

4 years agoGraph: Fix NPE in case of double destroy call .. (VBORegion2PMSAAES2)
Sven Gothel [Mon, 17 Mar 2014 19:44:21 +0000 (20:44 +0100)]
Graph: Fix NPE in case of double destroy call .. (VBORegion2PMSAAES2)

4 years agoGraph: Fix NPE in case of double destroy call ..
Sven Gothel [Mon, 17 Mar 2014 19:42:44 +0000 (20:42 +0100)]
Graph: Fix NPE in case of double destroy call ..

4 years agoSceneUIController: Remove unused (and not commited) Matrix reference
Sven Gothel [Mon, 17 Mar 2014 16:13:06 +0000 (17:13 +0100)]
SceneUIController: Remove unused (and not commited) Matrix reference

4 years agoFix GraphUI - Remove MSAA if in VBAA mode (double AA not so good) - Adding NApplet...
Sven Gothel [Mon, 17 Mar 2014 16:11:37 +0000 (17:11 +0100)]
Fix GraphUI - Remove MSAA if in VBAA mode (double AA not so good) - Adding NApplet for VBAA

4 years agoBug 801: GraphUI .. Missed 'CrossHair' Class (Commit 6382ee094953fd4fef35a8e60a29b482...
Sven Gothel [Mon, 17 Mar 2014 15:18:10 +0000 (16:18 +0100)]
Bug 801: GraphUI .. Missed 'CrossHair' Class (Commit 6382ee094953fd4fef35a8e60a29b482ae1b79c3)

4 years agoBug 801: GraphUI .. Fixed transformations, cleanup - All shape-object oriented actions.
Sven Gothel [Mon, 17 Mar 2014 15:14:44 +0000 (16:14 +0100)]
Bug 801: GraphUI .. Fixed transformations, cleanup - All shape-object oriented actions.

http://jogamp.org/files/screenshots/graphui/01/

4 years agoAABBox: Add rotate(..)
Sven Gothel [Mon, 17 Mar 2014 15:13:50 +0000 (16:13 +0100)]
AABBox: Add rotate(..)

4 years agoQuaternion: Add rotateByEuler(..); AABBox: Add translate(..); Minor edits ..
Sven Gothel [Mon, 17 Mar 2014 08:22:51 +0000 (09:22 +0100)]
Quaternion: Add rotateByEuler(..); AABBox: Add translate(..); Minor edits ..

4 years agoBug 801: Revisit UIShape/SceneController (Ray-Picking, Full Object/Model driven,...
Sven Gothel [Sun, 16 Mar 2014 05:07:07 +0000 (06:07 +0100)]
Bug 801: Revisit UIShape/SceneController (Ray-Picking, Full Object/Model driven, ..) TODO: Transformations

SceneUIController handles shapes generic: Rendering, selecting and event traversing.
All data (transforms ..) are provided by UIShape.

UIShape:
  - Dispatching NEWT MouseEvent's on MouseEventListener
  - Separates the 2d-transforms for shape/region
    and 3d transform, scale and rotation

GPUUISceneGLListener0A Demo code merely
aggregates the shapes and attaches listener, hence includes
the 'application logic'.

Working:
  - picking any shape
  - dragging, zooming, actions

TODO:
  - Fix transformations, actually the rotations (button) look odd
    probably due to 'unlucky' rotation center and axis.

+++

RegionRenderer: Removed Matrix ops, which shall be applied on PMVMatrix

4 years agoAdd generic support for picking via raycast intersection and AABBox (or similar)
Sven Gothel [Sun, 16 Mar 2014 00:43:27 +0000 (01:43 +0100)]
Add generic support for picking via raycast intersection and AABBox (or similar)

- New simple type Ray, denominating a .. ray

- Added PMVMatrix.gluUnProjectRay(..) similar to gluUnproject(..)
  however, result is a Ray.

- Added AABBox.intersectsRay(Ray) ..

4 years agoNEWT: Minor edits
Sven Gothel [Sun, 16 Mar 2014 00:36:59 +0000 (01:36 +0100)]
NEWT: Minor edits

4 years agoFloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit tests...
Sven Gothel [Sat, 15 Mar 2014 15:54:34 +0000 (16:54 +0100)]
FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)

4 years agoBug 801: Fix GPUUISceneGLListener0A (GraphUI Demo) .. Transformations .. etc
Sven Gothel [Sat, 15 Mar 2014 10:29:52 +0000 (11:29 +0100)]
Bug 801: Fix GPUUISceneGLListener0A (GraphUI Demo) .. Transformations .. etc

4 years agoQuaternion: User EPSILON for all tests against zero and one (identity .. ) and docume...
Sven Gothel [Sat, 15 Mar 2014 09:21:36 +0000 (10:21 +0100)]
Quaternion: User EPSILON for all tests against zero and one (identity .. ) and document the same. ; Minor edits ..

4 years agoBug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed resize.
Sven Gothel [Sat, 15 Mar 2014 06:02:35 +0000 (07:02 +0100)]
Bug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed resize.

4 years agoBug 801: Outline/OutlineShape tranform and sort fixes ; Quaternion: Reduce muls in...
Sven Gothel [Sat, 15 Mar 2014 04:47:01 +0000 (05:47 +0100)]
Bug 801: Outline/OutlineShape tranform and sort fixes ; Quaternion: Reduce muls in rotateVector

Quaternion:
  - rotateVector(..): Reduce multiplication count by 17

Graph:
  - Outline
    - add: transform
    - fix compareTo .. use EPSILON

  - OutlineShape
    - add transform
    - fix compareTo .. use EPSILON
    - use Comparator<Outline> in sortOutlines
      to avoid reversal of list

  - Extract OutlineShapeXForm, pairing { OutlineShape, AffineTransform }

4 years agoPMVMatrix.glLoadMatrix(Quaternion): Load Quaternion's directly w/o intermediate matrix
Sven Gothel [Fri, 14 Mar 2014 07:26:01 +0000 (08:26 +0100)]
PMVMatrix.glLoadMatrix(Quaternion): Load Quaternion's directly w/o intermediate matrix

4 years agoBug 801: Add Frustum support to Region; Misc ..
Sven Gothel [Fri, 14 Mar 2014 07:13:42 +0000 (08:13 +0100)]
Bug 801: Add Frustum support to Region; Misc ..

Region: Add Frustum support, to drop 'out of sight' shapes

RenderState: Add hints, e.g. BITHINT_BLENDING_ENABLED,
             allowing user code to toggle background color etc

Demos: Incomplete - WIP
  - Reuse mapped object to window coords computed at reshape
  - TODO: Use minimal Scenegraph for Graph-UI ..

http://JogAmp.org git info: FAQ, tutorial and man pages.