Jogamp
jogl.git
3 years agoNEWT Window setSurfaceSize(..): Add API doc comment about setting pixel-unit size... v2.2.0
Sven Gothel [Wed, 6 Aug 2014 22:11:37 +0000 (00:11 +0200)]
NEWT Window setSurfaceSize(..): Add API doc comment about setting pixel-unit size after creation in multiple monitor mode.

3 years agoBug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for movie...
Sven Gothel [Wed, 6 Aug 2014 22:10:41 +0000 (00:10 +0200)]
Bug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for movie playback and OSX usage (HiDPI surfaceSize)

- StereoDevice.DeviceType: Add API doc

- StereoDevice: Add getFactory()

- GenericStereoDevice
  - Use common static vars for configurations for simplicity

  - Fix createRenderer(..)'s eyeViewport in case no post-processing
    is performed, i.e. needs viewport X offset.

- StereoDemo01
  - Use 'movie' eyePosition instead of default if:
    - using a movie player _and_ using lenses!

  - Fix NEWT window pixel-unit size after window creation!

3 years agoBug 1021: Fix OculusVR detection, need to probe HMD count, otherwise native SDK code...
Sven Gothel [Wed, 6 Aug 2014 22:05:47 +0000 (00:05 +0200)]
Bug 1021: Fix OculusVR detection, need to probe HMD count, otherwise native SDK code crashes w/ NPE

3 years agoBug 1039: Rename GLAnimatorControl.UncaughtGLAnimatorExceptionHandler -> GLAnimatorCo...
Sven Gothel [Wed, 6 Aug 2014 04:06:01 +0000 (06:06 +0200)]
Bug 1039: Rename GLAnimatorControl.UncaughtGLAnimatorExceptionHandler -> GLAnimatorControl.UncaughtExceptionHandler

3 years agoBug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawa...
Sven Gothel [Wed, 6 Aug 2014 03:59:08 +0000 (05:59 +0200)]
Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawable processing [part-3]

Add GLAnimatorControl.UncaughtGLAnimatorExceptionHandler interface to optionally handle
uncaught exception within an animator thread by the user.

Implementation also requires to flush all enqueued GLRunnable instances
via GLAutoDrawable.invoked(..) in case such exception occurs.
Hence 'GLAutoDrawable.flushGLRunnables()' has been added.

Only subsequent exceptions, which cannot be thrown are dumped to System.stderr.

+++

Handling of exceptions during dispose()

Exception in NEWT's disposeGL*() are also caught and re-thrown after
the NEWT window has been destroyed in WindowImpl.destroyAction:

  - GLEventListener.dispose(..)
    - GLDrawableHelper.disposeAllGLEventListener(..)
      - GLDrawableHelper.disposeGL(..)
        - GLAutoDrawableBase.destroyImplInLock(..)
          - GLWindow.GLLifecycleHook.destroyActionInLock(..)
            - WindowImpl.destroyAction on NEWT-EDT
              - WindowImpl.destroy

Further more, exceptions occuring in native windowing toolkit triggered destroy()
are ignored:
  - GLAutoDrawableBase.defaultWindowDestroyNotifyOp(..)

It has to be seen whether such exception handling for
dispose() shall be added to AWT/SWT.

+++

TestGLException01NEWT covers all GLEventListener exception cases
on-thread and off-thread (via animator).

+++

3 years agoBug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawa...
Sven Gothel [Tue, 5 Aug 2014 21:01:28 +0000 (23:01 +0200)]
Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawable processing [part-2]

In case of an exception thrown within an GLEventListener
called off-thread by Animator:
  - Animator shall stop
  - Animator shall forward the exception

GLDrawableHelper shall also flush all queued GLRunnable tasks
in case of an exception, so that another thread waiting until it's completion
is notified and continues processing.

3 years agoBug 1028 - AMD Windows driver thread hinders JVM process to exit/end, caused by _not_...
Sven Gothel [Tue, 5 Aug 2014 15:09:40 +0000 (17:09 +0200)]
Bug 1028 - AMD Windows driver thread hinders JVM process to exit/end, caused by _not_ destroying the SharedResource context

SharedResourceRunner stop() method
is invoked by JMV shutdown hook and GLProfile/GLDrawableFactory.shutdown*().

It shall issue SharedResource.releaseSharedResource() for all implementations,
e.g. X11/GLX and Windows/WGL.

+++

Root cause is a GL driver thread keeping the process alive.

+++

On X11/GLX we destroy the shared context and the shared drawable.

On Windows/WGL we only destroy the shared drawable,
knowing that destroying the shared context caused a driver bug in the past.

Will enable the shared context destruction, which is the proper way.

+++

Commiting this patch to see whether our jenkins builds won't crash
due to previous experienced issues.

3 years agoBug 1036: Renamed property to switch off NVidia Windows workaround 'jogl.windows...
Sven Gothel [Mon, 4 Aug 2014 12:10:47 +0000 (14:10 +0200)]
Bug 1036: Renamed property to switch off NVidia Windows workaround 'jogl.windows.cpu_affinity_mode' (dropping '.debug')

3 years agoFix NPE regression of commit ba1ffe66697c3175b423cb7ab9b686d73959708d
Sven Gothel [Thu, 31 Jul 2014 05:32:08 +0000 (07:32 +0200)]
Fix NPE regression of commit ba1ffe66697c3175b423cb7ab9b686d73959708d

3 years agoBug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawa...
Sven Gothel [Thu, 31 Jul 2014 00:42:39 +0000 (02:42 +0200)]
Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawable processing [part-1]

Implements Specification as described on 'Bug 1039 Comment 1'
  <https://jogamp.org/bugzilla/show_bug.cgi?id=1039#c1>

TODO:
  - Offthread exception handler

++++

GLDrawableHelper is used in all GLAutoDrawable implementations
and for most operations.

GLAutoDrawable/GLDrawableHelper invoke(..) method:

- invoke(..) forwards a caught exception
  - if blocking, it forwards an exception
    happening within the passed GLRunnable(s).
    Here the exception is caught, printed
    and then thrown by invoke itself.

  - if non-blocking, an exception
    happening within the passed GLRunnable(s)
    will be thrown in the thread issuing it's execution,
    i.e. display() call.
    Here the exception is not caught and simply thrown
    by the GLRunnable.

GLAutoDrawable.destroy() -> GLDrawableHelper.disposeGL(..) method:

- disposeAllGLEventListener() being invoked by disposeGL(..),
  catches exception thrown by GLEventListener.dispose(..)
  and prints them to stderr.
  The first caught exception is re-thrown at the end as an GLException.

- disposeGL() catches re-thrown GLException by disposeAllGLEventListener()
  for GLEventListener.dispose(..)
  and re-throws it when operation is complete.

- disposeGL() catches an exception thrown at context destruction or release
  and re-throws it when operation is complete.
  An early exception at context.makeCurrent() is _not_ caught,
  since it is the first operation which simply shall unwind the stack.

GLAutoDrawable.display() -> GLDrawableHelper.invokeGLImpl(..) method:

- invokeGLImpl(..) for display() follows disposeGL() mechanism, i.e.
  it catches exception thrown at
  GLEventListener's init(..), reshape(..) and display(..) methods
  and re-throws it when operation is complete.

  It also catches an exception thrown at context release
  and re-throws it when operation is complete.
  An early exception at context.makeCurrent() is _not_ caught,
  since it is the first operation which simply shall unwind the stack.

++++

None of the above thrown exception shall be caught and suppressed
on the caller side.

If an operation must be completed while an exception is caught,
it shall be cached and re-thrown after the operations.

In case multiple exception at multiple places are caught within
an operation, they all shall be cached and the first one
shall be re-thrown.

In case of multiple exception from the same place,
i.e. a loop through all GLEventListener,
the first shall be cached and re-thrown after operation is completed.

It has to be determined, whether we like to dump the exceptions,
especially the ones who get suppressed in case of multiple exceptions.

3 years agoBug 830 - Refine Heuristics for to query whether GLDrawableUtil.swapGLContextAndAllGL...
Sven Gothel [Wed, 30 Jul 2014 22:54:24 +0000 (00:54 +0200)]
Bug 830 - Refine Heuristics for to query whether GLDrawableUtil.swapGLContextAndAllGLEventListener is safe: Add Accumulator Buffer bits

3 years agoGLDrawable: Expose getRequestedGLCapabilities() (Include to public API)
Sven Gothel [Wed, 30 Jul 2014 22:48:40 +0000 (00:48 +0200)]
GLDrawable: Expose getRequestedGLCapabilities() (Include to public API)

In certain cases, it is required to read the user requested capabilities
from places other than the user code.

Hence adding public method to GLDrawable interface.

This removes the need to cast to private GLDrawableImpl,
which included such method.

3 years agoRefine test ff5dba28610b4f680c9320e9e52669ed54d4de43: Perform context switch on GL...
Sven Gothel [Wed, 30 Jul 2014 20:05:52 +0000 (22:05 +0200)]
Refine test ff5dba28610b4f680c9320e9e52669ed54d4de43: Perform context switch on GL capable thread if required. Add API doc note about this requirement.

3 years agoFix commit adf8e6e40aa9513036864489642cfef252804d08 (Bug 1036): long -> jlong in...
Sven Gothel [Wed, 30 Jul 2014 18:41:08 +0000 (20:41 +0200)]
Fix commit adf8e6e40aa9513036864489642cfef252804d08 (Bug 1036): long -> jlong in JNI func spec

3 years agoBug 830 - Add Heuristics for to query whether GLDrawableUtil.swapGLContextAndAllGLEve...
Sven Gothel [Wed, 30 Jul 2014 18:13:34 +0000 (20:13 +0200)]
Bug 830 - Add Heuristics for to query whether 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

3 years agoBug 1036: NVidia's Windows Driver Threaded optimization: Alternative affinity mask...
Sven Gothel [Wed, 30 Jul 2014 14:21:17 +0000 (16:21 +0200)]
Bug 1036: NVidia's Windows Driver Threaded optimization: Alternative affinity mask setting on all threads of process - Didn't work (disabled)

3 years agoBug 1038 - Fix: Allow skipping detection of certain GLProfiles: Skip 'ARB_create_context'
Sven Gothel [Wed, 30 Jul 2014 02:51:14 +0000 (04:51 +0200)]
Bug 1038 - Fix: Allow skipping detection of certain GLProfiles: Skip 'ARB_create_context'

Commit e5a55ede324ce500f50991d56491758803063a58 was incomplete,
i.e. it lacked the required mappings for the non ARB profile, i.e.:
  GL4bc -> GL3bc, etc.

These profile mappings have been added now.

+++

Further more, GLContext's profile queries, isGL*()
test the ctxOptions for CTX_IS_ARB_CREATED.
This has to be removed to properly work w/ Skip 'ARB_create_context'.

To remove the risk of inconcistency, i.e. context created via ARB and non-ARB,
the 'GLX/WGL profile >= GL3 via non ARB' validation removed
in commit e5a55ede324ce500f50991d56491758803063a58 has been brought back
and refined. Note:
  if( glp.isGL3() && createContextARBTried ) {
    // We shall not allow context creation >= GL3 w/ non ARB methods if ARB is used,
    // otherwise context of similar profile but different creation method may not be share-able.
    .. THROW EXCEPTON ..
  }
This limited validation removes the possibility of such having a context
of same profile, one created via ARB and one without.
Hence also validates the isGL*() change, where the CTX_IS_ARB_CREATED criteria is removed.

+++

Note regarding commit 7314b47ae1e42997e9e6974b84709640f0ac2a1b (revert):

While analyzing the mapping, it turns out that commit c8b99d197769eaec53c2def562c0ef3fc0e6a9d2
  "Don't map compatibility profiles to core profile if the latter are not available (restrict profile aliasing)"
is not fully consistent with GLProfile's and GLContext's profile queries, i.e. isGL*().
We may reiterate over this change .. but have it be reverted for now.

3 years agoRevert "GLContext: Don't map compatibility profiles to core profile if the latter...
Sven Gothel [Wed, 30 Jul 2014 02:24:46 +0000 (04:24 +0200)]
Revert "GLContext: Don't map compatibility profiles to core profile if the latter are not available (restrict profile aliasing) ; GLProfile does this - Simplification."

This reverts commit c8b99d197769eaec53c2def562c0ef3fc0e6a9d2.

3 years agoBug 1038 - Allow skipping detection of certain GLProfiles: Skip 'ARB_create_context...
Sven Gothel [Wed, 30 Jul 2014 01:06:30 +0000 (03:06 +0200)]
Bug 1038 - Allow skipping detection of certain GLProfiles: Skip 'ARB_create_context' context creation extension via property 'jogl.disable.openglarbcontext'; ...

Only allow the exclusions if platform OS is not OSX:
  - jogl.disable.openglcore
  - jogl.disable.openglarbcontext

Since on OSX they are known to work reliable and there is not other method
if receiving a higher GL profile than core and ARB.

This also removes the restrictions on X11 and Windows,
where profiles >= GL3 must be created using ARB_create_context.
Hence this is allowed now.

3 years agoGLContext: Don't map compatibility profiles to core profile if the latter are not...
Sven Gothel [Wed, 30 Jul 2014 00:37:47 +0000 (02:37 +0200)]
GLContext: Don't map compatibility profiles to core profile if the latter are not available (restrict profile aliasing) ; GLProfile does this - Simplification.

GLContext shall not map compatibility profiles to core profile if the latter is are not available (restrict profile aliasing).

If a user requests a straight GL3 core profile, don't answer with a compatibility profile, e.g. GL4bc.

Hence this patch exposes the true GL profile situation more honestly the the user!

User can already query profile mappings via GLProfile, i.e.
  - GL2GL3,
  - GL4ES3, or via
  - getMaximum
  - getMaxFixedFunc
  - getMaxProgrammable
  - getMaxProgrammableCore

This also fixes an issue when a user requests 'getMaxProgrammableCore'
but would receive a GL4bc profile.

3 years agoBug 1038 - Allow skipping detection of certain GLProfiles: Skip native core profiles...
Sven Gothel [Tue, 29 Jul 2014 20:55:56 +0000 (22:55 +0200)]
Bug 1038 - Allow skipping detection of certain GLProfiles: Skip native core profiles via property 'jogl.disable.openglcore'

Also moved all GL profile properties to GLProfile class and made them public for better documentation.

3 years agoFixedFuncHook: Use downstream gl.getGLProfile().getImpl() for custom GL2ES1 impl...
Sven Gothel [Tue, 29 Jul 2014 19:13:17 +0000 (21:13 +0200)]
FixedFuncHook: Use downstream gl.getGLProfile().getImpl() for custom GL2ES1 impl. profile, reflecting true implementing profile.

3 years agoFix ShaderCode.es3_default_precision_fp: ES 3.x requires same precision for uniforms...
Sven Gothel [Tue, 29 Jul 2014 19:12:23 +0000 (21:12 +0200)]
Fix ShaderCode.es3_default_precision_fp: ES 3.x requires same precision for uniforms -> re-use es3_default_precision_vp; Fixes PointsDemoES2

3 years agoBuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow FixedF...
Sven Gothel [Tue, 29 Jul 2014 18:52:10 +0000 (20:52 +0200)]
BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow FixedFunctionHook to properly determine it's identity

BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow using a prologue hook
as needed for FixedFunctionHook's 'isGL*core()', 'isGLES*Compatible()' and 'getGLProfile()' methods.

The latter FixedFunctionHook take the emulated GL profile GL2ES1 into account,
allowing JOGL code to assume only having GL2ES1 available.
Otherwise methods like Texture.enable(..) would skip the glEnable(TEXTURE_2D)
call and FixedFunctionHook could not enable it's usage.

GLProfile received a 'public static GLProfile createCustomGLProfile(final String profile, final GLProfile profileImpl)'
allowing utilities like FixedFunctionHook to create a generic profile.

BuildComposablePipeline sorts the methods before emitting for better readability.

3 years agoGLContext.hasNoDefaultVAO(): Remove ES 3.x, fixing issues w/ ES 3.x client side verte...
Sven Gothel [Tue, 29 Jul 2014 18:43:06 +0000 (20:43 +0200)]
GLContext.hasNoDefaultVAO(): Remove ES 3.x, fixing issues w/ ES 3.x client side vertex arrays

Commit 6136457f10d020c779adc78641d0048f77ab1635 defined hasNoDefaultVAO() as [ GL4, GL3, GLES3 ],
however ES 3.x still supports (deprecated):
  - client side vertex arrays
  - default vertex array object (VAO)

Setting a custom VAO leads to GL_INVALID_OPERATION for client side vertex arrays
used w/ glVertexPointer(..).

Hence removing GLES3 from hasNoDefaultVAO().

3 years agoWindowsWGLDrawableFactory: Fix html doc
Sven Gothel [Tue, 29 Jul 2014 03:42:12 +0000 (05:42 +0200)]
WindowsWGLDrawableFactory: Fix html doc

3 years agoBug 1036: NVidia Windows Driver 'Threaded optimization' workaround. [3/3]
Sven Gothel [Tue, 29 Jul 2014 03:41:47 +0000 (05:41 +0200)]
Bug 1036: NVidia Windows Driver 'Threaded optimization' workaround. [3/3]

Commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b added a workaround for
NVidia's Windows Driver Threaded optimization bug
existing in NVidia driver 260.99 for Window from 2010-12-11.

Commit 007f120cd8d33e4231ef4d207b85ed156d1e0c82
fixed the workaround and made it optional, default: turned off!

Rational of turning the workaround off was due to testing
against the original test-case 'Applet and Webstart'
with drivers >= 266.58 from 2011-01-24,
which did not reproduce this issue.

However, our unit tests reproduced the issue,
e.g. test: com.jogamp.opengl.test.junit.jogl.caps.TestTranslucencyNEWT

Hence we have to re-enable the workaround per default.

Added the following documentation of the issue:

+++

Since NV driver 260.99 from 2010-12-11 a 'Threaded optimization' feature has been introduced.
The driver spawns off a dedicated thread to off-load certain OpenGL tasks from the calling thread
to perform them async and off-thread.

If 'Threaded optimization' is manually enabled 'on', the driver may crash with JOGL's consistent
multi-threaded usage - this is a driver bug.

If 'Threaded optimization' is manually disabled 'off', the driver always works correctly.

'Threaded optimization' default setting is 'auto' and the driver may crash without this workaround.

If setting the process affinity to '1' (1st CPU) while initialization and launching
the  SharedResourceRunner, the driver does not crash anymore in 'auto' mode.
This might be either because the driver does not enable 'Threaded optimization'
or because the driver's worker thread is bound to the same CPU.

Property integer value <code>jogl.debug.windows.cpu_affinity_mode</code>:
  0 - none (no affinity, may cause driver crash with 'Threaded optimization' = ['auto', 'on'])
  1 - process affinity (default, workaround for driver crash for 'Threaded optimization' = 'auto', still crashes if set to 'on')

+++

Note: WindowsThreadAffinity does _not_ work.

3 years agoWindowImpl: Fix intendation
Sven Gothel [Tue, 29 Jul 2014 03:08:16 +0000 (05:08 +0200)]
WindowImpl: Fix intendation

3 years agoBug 1016 - GLJPanel Offscreen FBO size may exceed GL MAX TEXTURE SIZE, only use an...
Sven Gothel [Mon, 28 Jul 2014 17:05:37 +0000 (19:05 +0200)]
Bug 1016 - GLJPanel Offscreen FBO size may exceed GL MAX TEXTURE SIZE, only use an FBO TextureAttachment if required

We only require an FBO TextureAttachment if using GLSL vertical flip,
otherwise we simply requires a color renderbuffer.

Further, the 'FBO fboFlipped' in GLSL vertical flip mode also simply requires a color renderbuffer.

3 years agoGLJPanel: Enhance API doc on setSkipGLOrientationVerticalFlip(..)
Sven Gothel [Mon, 28 Jul 2014 16:39:18 +0000 (18:39 +0200)]
GLJPanel: Enhance API doc on setSkipGLOrientationVerticalFlip(..)

3 years agoGLJPanel: Only dump verbose debug on frameCount each frame if property 'jogl.debug...
Sven Gothel [Mon, 28 Jul 2014 16:38:18 +0000 (18:38 +0200)]
GLJPanel: Only dump verbose debug on frameCount each frame if property 'jogl.debug.GLJPanel.Frames' is defined

3 years agoGLJPanel: Enhance the class API-doc
Sven Gothel [Mon, 28 Jul 2014 16:37:01 +0000 (18:37 +0200)]
GLJPanel: Enhance the class API-doc

3 years agoBug 1037 - FBObject: Add proper attachment size validation at init, reset and attachC...
Sven Gothel [Mon, 28 Jul 2014 16:36:17 +0000 (18:36 +0200)]
Bug 1037 - FBObject: Add proper attachment size validation at init, reset and attachColorbuffer(..) / attachRenderbuffer(..)

3 years agoBug 1037 - FBObject/GLFBODrawable: Do not assume using a TextureAttachment for a...
Sven Gothel [Mon, 28 Jul 2014 13:29:59 +0000 (15:29 +0200)]
Bug 1037 - FBObject/GLFBODrawable: Do not assume using a TextureAttachment for a Colorbuffer, also make DEPTH optional.

API Change

+++

In certain cases a TextureAttachment for the FBO's color buffer
is not desired, either for performance reasons where texture functionality
is not required or to avoid texture restrictions like size, etc.

+++

GLFBODrawable shall use TextureAttachment for the FBO's color buffer
and a DEPTH buffer per default.
However, the user shall be allowed to use a plain ColorAttachment (renderbuffer)
and also no DEPTH buffer.

+++

FBObject Details:
 - Colorbuffer interface exposes Attachment details
   like format, size, etc as well as it's implementation
   specifics, isTextureAttachment() and getTextureAttachment() allowing a clean cast and type query.

 - Allow ColorAttachment to be used for non MSAA

 - Make TextureAttachment optional for method 'use(GL, TextureAttachment)'

 - Only validate size against MAX_TEXTURESIZE if using a TextureAttachment

 - API Change:
   - rename: getColorAttachmentCount() -> getColorbufferCount()
   - add: getTextureAttachmentCount()
   - change 'TextureAttachment getSamplingSink()' -> 'Colorbuffer getSamplingSink()'

3 years agoBug 1029 - Memory leak in GLDrawableHelper: 'perThreadInitAction' shall use a WeakRef...
Sven Gothel [Sun, 27 Jul 2014 22:47:33 +0000 (00:47 +0200)]
Bug 1029 - Memory leak in GLDrawableHelper: 'perThreadInitAction' shall use a WeakReference

Static ThreadLocal 'perThreadInitAction' leaks memory if using a hard reference,
utilizing a WeakReference allows the passed 'initAction' owner to be garbage collected.

3 years agoBug 1035 - Allow Gamma [Brightness, Contrast] settings to be performed on display...
Sven Gothel [Sun, 27 Jul 2014 21:23:15 +0000 (23:23 +0200)]
Bug 1035 - Allow Gamma [Brightness, Contrast] settings to be performed on display/screen of a NativeSurface

Currently GLDrawableFactoryImpl's gamma settings are performed
only on the main screen.

Allow passing a NativeSurface, so it's display/screen
gamma values will be changed.

Further, promote low-level gamma settings to GLDrawableFactory
for direct usage.

Change com.jogamp.opengl.util.Gamma to use a GLDrawable
instead of a GL object to clarify that we use the drawable.

Also add a GLAutoDrawable variant, allowing proper locking
of its 'upstream-lock' to guarantee atomicity.

+++

Tested manually w/ TestGearsES2NEWT on X11 and Windows
using the 'g' and 'G' to modify gamma.
Value is properly reset on exit.

3 years agoFixed and Changed NVidia Windows Driver Threaded optimization bug workaround of commi...
Sven Gothel [Sun, 27 Jul 2014 02:00:26 +0000 (04:00 +0200)]
Fixed and Changed NVidia Windows Driver Threaded optimization bug workaround of commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b

Commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b added a workaround
for the NVidia driver 260.99 for Window from 2010-12-11 issue.

[1] The workaround sets a process affinity while JOGL initialization
to mitigate NVidia driver's 'Threaded optimization := On' race conditions.
The process affinity is reset reset after initialization.

[2] The process affinity reset code had a bug, i.e. instead to restore the
original process's affinity mask, we restored the system's default affinity mask.

[3] Further more, there seem to be issues with changing a process affinity mask
regarding the process group.

This patch:
  - Solves issue [2] by using the original process affinity mask

  - Solves issue [3] by allowing a custom
    affinity mode via the property 'jogl.debug.windows.cpu_affinity_mode':

      - 0 - none (default, no affinity required for Windows NV driver >= 266.58 from 2011-01-24)
      - 1 - process affinity (was required w/ Windows NV driver 260.99 from 2010-12-11, see commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b)
      - 2 - thread affinity (experimental)

    Hence the workaround is disabled by default,
    since the crash as dicumented in commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b
    could not be reproduced with NV driver 266.58 from 2011-01-24.

3 years agoBug 1033: Guarantee atomicity of high-level GLAutoDrawable operations, avoiding race...
Sven Gothel [Sun, 27 Jul 2014 01:49:21 +0000 (03:49 +0200)]
Bug 1033: Guarantee atomicity of high-level GLAutoDrawable operations, 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

3 years agoBug 1024: Add fallback for native-jar-file location via classpath
Sven Gothel [Fri, 11 Jul 2014 01:09:58 +0000 (03:09 +0200)]
Bug 1024: Add fallback for native-jar-file location via classpath

Adapt to GlueGen commit f5c48efcf546ba4e08e197ccced6df83b57e1755

3 years agoRefine commit 808d95cd692ab666271a83c70e8509859586de72 LICENSE.txt: Add optional...
Sven Gothel [Thu, 10 Jul 2014 14:58:36 +0000 (16:58 +0200)]
Refine commit 808d95cd692ab666271a83c70e8509859586de72 LICENSE.txt: Add optional removal of oculusvr artifacts from official builds, if user dislikes.

3 years agoStereoClientRenderer: Fix API doc anchor link
Sven Gothel [Thu, 10 Jul 2014 14:50:36 +0000 (16:50 +0200)]
StereoClientRenderer: Fix API doc anchor link

3 years agoRefine 'GLSharedContextSetter' test cases: Use 'setSharedAutoDrawable(sharedAutoDrawa...
Sven Gothel [Thu, 10 Jul 2014 14:50:16 +0000 (16:50 +0200)]
Refine 'GLSharedContextSetter' test cases: Use 'setSharedAutoDrawable(sharedAutoDrawable)' where possible; Fix/Refine API doc.

3 years agoRefine commit ec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25: Call 'areAllGLEventListenerIn...
Sven Gothel [Thu, 10 Jul 2014 14:06:32 +0000 (16:06 +0200)]
Refine commit ec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25: Call 'areAllGLEventListenerInitialized()' directly from GLAutoDrawable

3 years agoRefine JOGL's LICENSE.txt: Distinguish between 'New BSD 2-Clause License' compatible...
Sven Gothel [Thu, 10 Jul 2014 13:32:37 +0000 (15:32 +0200)]
Refine JOGL's LICENSE.txt: Distinguish between 'New BSD 2-Clause License' compatible and not-compatible materials! OculusVR RIFT SDK license is not compatible, but usable and optional!

.. also refine A.7) Oculus VR Rift SDK Software License

3 years agoStereoDeviceRenderer/ClientRenderer: Add note about 'Correct Asymmetric FOV Rendering...
Sven Gothel [Thu, 10 Jul 2014 13:03:52 +0000 (15:03 +0200)]
StereoDeviceRenderer/ClientRenderer: Add note about 'Correct Asymmetric FOV Rendering', using FovHVHalves - incl. references

3 years agoBug 982: Adding test TGA file for confirmation - No bug
Sven Gothel [Thu, 10 Jul 2014 12:03:34 +0000 (14:03 +0200)]
Bug 982: Adding test TGA file for confirmation - No bug

3 years agoBug 1031: Remove Deprecated Classes and Methods (JOGL)
Sven Gothel [Wed, 9 Jul 2014 23:11:00 +0000 (01:11 +0200)]
Bug 1031: Remove Deprecated Classes and Methods (JOGL)

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

3 years agoBug 801: Add Graph pass-2 shader for VBAA 'odd' sample count
Sven Gothel [Wed, 9 Jul 2014 19:32:13 +0000 (21:32 +0200)]
Bug 801: Add Graph pass-2 shader for VBAA 'odd' sample count

3 years agoStereoDevice: Don't make inner class's method private due to wrapper generation ...
Sven Gothel [Tue, 8 Jul 2014 21:17:49 +0000 (23:17 +0200)]
StereoDevice: Don't make inner class's method private due to wrapper generation (still, findbugs didn't report this)

3 years agoFindbugs: Comment on some issues (OK, they are) ; Remove dead branches
Sven Gothel [Tue, 8 Jul 2014 21:17:03 +0000 (23:17 +0200)]
Findbugs: Comment on some issues (OK, they are) ; Remove dead branches

3 years agoFindbugs: Use static fields where possible
Sven Gothel [Tue, 8 Jul 2014 21:16:10 +0000 (23:16 +0200)]
Findbugs: Use static fields where possible

3 years agoFindbugs: Use inner static class where possible
Sven Gothel [Tue, 8 Jul 2014 21:15:33 +0000 (23:15 +0200)]
Findbugs: Use inner static class where possible

3 years agoFindbugs: Misc issues (Use private accessors of static fields; Use boolean operator...
Sven Gothel [Tue, 8 Jul 2014 20:14:45 +0000 (22:14 +0200)]
Findbugs: Misc issues (Use private accessors of static fields; Use boolean operator; Avoid NPE

3 years agoFindbugs: Use 'float' division instead of integer for float results
Sven Gothel [Tue, 8 Jul 2014 20:12:48 +0000 (22:12 +0200)]
Findbugs: Use 'float' division instead of integer for float results

3 years agoFindbugs: Use AtomicInteger for synchronized increment access
Sven Gothel [Tue, 8 Jul 2014 20:11:55 +0000 (22:11 +0200)]
Findbugs: Use AtomicInteger for synchronized increment access

3 years agoAnimatorBase: Use cached synchronized value instead of unsynchronized (sloppy left...
Sven Gothel [Tue, 8 Jul 2014 20:10:47 +0000 (22:10 +0200)]
AnimatorBase: Use cached synchronized value instead of unsynchronized (sloppy left-over code)

3 years agoFindbugs: Misc minor issues (see below)
Sven Gothel [Tue, 8 Jul 2014 20:10:03 +0000 (22:10 +0200)]
Findbugs: Misc minor issues (see below)

- remove duplicate code in branch
- Use Type.valueOf(primitive)
- Don't use array.toString() directly
- remove dead code

3 years agoFindbugs: Add comments that FB warnings are of no concern ..
Sven Gothel [Tue, 8 Jul 2014 20:05:56 +0000 (22:05 +0200)]
Findbugs: Add comments that FB warnings are of no concern ..

3 years agoFindbugs: Remove dead-code / unused [temp] storage and it's assignment
Sven Gothel [Tue, 8 Jul 2014 20:03:51 +0000 (22:03 +0200)]
Findbugs: Remove dead-code / unused [temp] storage and it's assignment

3 years agoFindbugs: Remove branches where reference cannot be null
Sven Gothel [Tue, 8 Jul 2014 19:13:15 +0000 (21:13 +0200)]
Findbugs: Remove branches where reference cannot be null

3 years agoFindbugs: Use <NumberType>.valueOf(..) instead of 'new <NumberType>(..)'
Sven Gothel [Tue, 8 Jul 2014 19:09:30 +0000 (21:09 +0200)]
Findbugs: Use <NumberType>.valueOf(..) instead of 'new <NumberType>(..)'

3 years agoFix regression of commit 96d530e7127c89db9991080e6268c6e8430d0619: EGLDisplayUtil...
Sven Gothel [Tue, 8 Jul 2014 17:03:06 +0000 (19:03 +0200)]
Fix regression of commit 96d530e7127c89db9991080e6268c6e8430d0619: EGLDisplayUtil.eglCreateEGLGraphicsDevice(..) call w/ uninitialized 'surface'

3 years agoFindbugs: Add comment about intended setting of static field by instance method.
Sven Gothel [Tue, 8 Jul 2014 10:41:11 +0000 (12:41 +0200)]
Findbugs: Add comment about intended setting of static field by instance method.

3 years agoFindbugs: Fix WindowImpl.getReconfigureFlags(..): Remove sloppy useless assignment...
Sven Gothel [Tue, 8 Jul 2014 10:40:28 +0000 (12:40 +0200)]
Findbugs: Fix WindowImpl.getReconfigureFlags(..): Remove sloppy useless assignment-or, replace by plain or

3 years agoFindbugs: Add FIXME comment regarding float comparison (consider using FloatUtil...
Sven Gothel [Tue, 8 Jul 2014 10:39:31 +0000 (12:39 +0200)]
Findbugs: Add FIXME comment regarding float comparison (consider using FloatUtil.isEqual(ax, bx, epsilon), FloatUtil.isZero(bx, epsilon), ..)

3 years agoFindbugs: Use Integer.parseInt(string) for int values to avoid boxing and unboxing
Sven Gothel [Tue, 8 Jul 2014 10:38:53 +0000 (12:38 +0200)]
Findbugs: Use Integer.parseInt(string) for int values to avoid boxing and unboxing

3 years agoFindbugs: Remove redundant instanceof checks
Sven Gothel [Tue, 8 Jul 2014 10:37:14 +0000 (12:37 +0200)]
Findbugs: Remove redundant instanceof checks

3 years agoFindbugs.static_final_immutable: Use final qualifier for static immutable instances.
Sven Gothel [Tue, 8 Jul 2014 10:36:13 +0000 (12:36 +0200)]
Findbugs.static_final_immutable: Use final qualifier for static immutable instances.

3 years agoGenericStereoDevice: Cast to float before operating division, requesting float. Base...
Sven Gothel [Tue, 8 Jul 2014 08:51:54 +0000 (10:51 +0200)]
GenericStereoDevice: Cast to float before operating division, requesting float. Base aspect-ratio on eyeTextureSize

3 years agoFindbugs.increment_volatile: Use AtomicInteger or add comment that operation is safe!
Sven Gothel [Tue, 8 Jul 2014 08:50:52 +0000 (10:50 +0200)]
Findbugs.increment_volatile: Use AtomicInteger or add comment that operation is safe!

3 years agoFindbugs.switch-case: GLBuffers.bytesPerPixel(..) throw GLException for type BITMAP...
Sven Gothel [Tue, 8 Jul 2014 08:48:58 +0000 (10:48 +0200)]
Findbugs.switch-case: GLBuffers.bytesPerPixel(..) throw GLException for type BITMAP && format !COLOR_INDEX || !STENCIL_INDEX

3 years agoFindbugs.not-written.null: Fix referencing non-written fields (never written or due...
Sven Gothel [Tue, 8 Jul 2014 08:47:41 +0000 (10:47 +0200)]
Findbugs.not-written.null: Fix referencing non-written fields (never written or due branching)

- AWT TextRenderer: Add throw new InternalError("fontRenderContext never initialized!"); FIXME!
- GLContextImpl.hasFBOImpl(): Fix serious NPE issue if extCache is null
- GLDrawableFactoryImpl.createOffscreenDrawableImpl(..):
  - Fix NPE issue w/ null drawable
  - Fix resetting GammaRamp by ensuring originalGammaRamp will be set at 1st setGammaRamp(..)

- AndroidGLMediaPlayerAPI14: Fix NPE: Use already resolved local referenced
- EGLDrawableFactory: Fix NPE: Only operate on non null surface!
- ALAudioSink.dequeueBuffer(..): Only resolve releasedBuffer elements if not null
-

3 years agoFindbugs.synchronization: Fix double-check w/o volatile; Remove redundant synchronize...
Sven Gothel [Tue, 8 Jul 2014 08:33:44 +0000 (10:33 +0200)]
Findbugs.synchronization: Fix double-check w/o volatile; Remove redundant synchronized from setter

3 years agoFindbugs.normal: Adding safeguard hashCode() implementation throwing InternalError...
Sven Gothel [Tue, 8 Jul 2014 08:10:39 +0000 (10:10 +0200)]
Findbugs.normal: Adding safeguard hashCode() implementation throwing InternalError("hashCode not designed")

As long we don't use Object.hashCode() to idenitify the memory address, we can safeguard the code.

3 years agoFindbugs.minor: Fix 'array -> string', missing argument
Sven Gothel [Tue, 8 Jul 2014 08:06:58 +0000 (10:06 +0200)]
Findbugs.minor: Fix 'array -> string', missing argument

3 years agoBug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in oculusvr...
Sven Gothel [Mon, 7 Jul 2014 21:46:19 +0000 (23:46 +0200)]
Bug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in oculusvr-sdk java distortion-mesh calculation if available

StereoDeviceFactory support new GenericStereoDeviceFactory, with it's GenericStereoDevice and GenericStereoDeviceRenderer.

GenericStereoDevice maintains different configurations, triggered either by passing a GenericStereoDevice.Config
instance directly or by the device-index parameter:

  - 0: monoscopi device: No post-processing

  - 1: stereoscopic device SBS: No post-processing

  - 2: stereoscopic device SBS + Lenses: Distortion post-processing
       (only available w/ oculusvr-sdk sub-module)

Producing a 'GenericStereoDevice.Config' instance is self containing
and may extend if supporting more device types like top-bottom, interlaced etc.

StereoDemo01 handles all use-cases and may be used as a test-bed
to add and experiment with stereoscopy, devices and settings.

3 years agoMerge remote-tracking branch 'github-mark/master' (Bug 1023/Bug 1024)
Sven Gothel [Sat, 5 Jul 2014 13:13:19 +0000 (15:13 +0200)]
Merge remote-tracking branch 'github-mark/master' (Bug 1023/Bug 1024)

Conflicts:
make/scripts/tests.sh

(build.xml: Using <copy tofile=".."/> instead of producing new jar files via <jar> to keep identity)

3 years agoFix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy),...
Sven Gothel [Sat, 5 Jul 2014 06:27:03 +0000 (08:27 +0200)]
Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy), fix callers; Simplify FloatUtil.makePerspective(..FovHVHalves..)

Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy), fix callers
 - This bug didn't hit (yet), since callers already performed the division (degree -> radian)
   by falsly claiming the passed value is in radian - where it was actually fov/2 in radians.

Simplify FloatUtil.makePerspective(..FovHVHalves..)
 - Due to the fix above, it became pretty clear that the makeFrustum(..)
   method can be utilized.
   Simply apply all our tan-half-fov values on zNear.

3 years agoBug 1021: Make OVR access vendor agnostic: Package 'com.jogamp.opengl.util.stereo...
Sven Gothel [Sat, 5 Jul 2014 02:04:43 +0000 (04:04 +0200)]
Bug 1021: Make OVR access vendor agnostic: Package 'com.jogamp.opengl.util.stereo' contains all public interfaces/classes

Renamed interfaces:
  CustomRendererListener -> CustomGLEventListener
  StereoRendererListener -> StereoGLEventListener

New vendor agnostic 'stuff' in com.jogamp.opengl.util.stereo:
  1 - StereoDeviceFactory
    To create a vendor specific StereoDeviceFactory instance,
    which creates the StereoDevice.

  2 - StereoDevice
    For vendor specific implementation.
    Can create StereoDeviceRenderer.

  3 - StereoDeviceRenderer
    For vendor specific implementation.

  4 - StereoClientRenderer
    Vendor agnostic client StereoGLEventListener renderer,
    using a StereoDeviceRenderer.
    Now supports multiple StereoGLEventListener, via add/remove.

- MovieSBSStereo demo-able via StereoDemo01
  can show SBS 3D movies.

3 years agobuild: Add oculusvr java-doc ; Add jogl-test-java-src.zip in 7z archive
Sven Gothel [Thu, 3 Jul 2014 17:03:03 +0000 (19:03 +0200)]
build: Add oculusvr java-doc ; Add jogl-test-java-src.zip in 7z archive

3 years agoHowToBuild: Add 'libudev-devel' for oculusvr-sdk sub-module compilation
Sven Gothel [Thu, 3 Jul 2014 17:02:26 +0000 (19:02 +0200)]
HowToBuild: Add 'libudev-devel' for oculusvr-sdk sub-module compilation

3 years agoBug 1021: Fix remaining build issues if sub-module oculusvr-sdk is missing
Sven Gothel [Thu, 3 Jul 2014 14:52:39 +0000 (16:52 +0200)]
Bug 1021: Fix remaining build issues if sub-module oculusvr-sdk is missing

3 years agoCode Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f3...
Sven Gothel [Thu, 3 Jul 2014 14:21:36 +0000 (16:21 +0200)]
Code Clean-Up based on our Recommended Settings (jogamp-scripting 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

3 years agoFloatUtil.makePick(..): Refine API doc, incl. PMVMatrix.gluPickMatrix(..)
Sven Gothel [Thu, 3 Jul 2014 13:06:12 +0000 (15:06 +0200)]
FloatUtil.makePick(..): Refine API doc, incl. PMVMatrix.gluPickMatrix(..)

3 years agoBug 1021: OVRSBSRenderer*: Add texture filtering parameter (bilinear/none), adjust...
Sven Gothel [Thu, 3 Jul 2014 11:55:56 +0000 (13:55 +0200)]
Bug 1021: OVRSBSRenderer*: Add texture filtering parameter (bilinear/none), adjust FBO texture params (alpha, filtering); Demo: Pass all parameters w/ arguments, use sane good defaults.

Turns out that using bilinear texture filtering w/o multisampling is 'good enough' ..

- OVRSBSRenderer*:
  - Add texture filtering parameter (bilinear/none)

  - Adjust FBO texture params (alpha, filtering)
    No alpha needed in FBO sink/target!

- Demo: Pass all parameters w/ arguments, use sane good defaults.

3 years agoBug 1021: OVRDistortion.getSBSUpstreamPMV(..): Use all cached eye parameter (example...
Sven Gothel [Thu, 3 Jul 2014 10:13:51 +0000 (12:13 +0200)]
Bug 1021: OVRDistortion.getSBSUpstreamPMV(..): Use all cached eye parameter (example implementation only)

3 years agoBug 1021: OVRDistortion.getSBSUpstreamPMV(..): Use generic perspective matrix constru...
Sven Gothel [Thu, 3 Jul 2014 08:16:17 +0000 (10:16 +0200)]
Bug 1021: OVRDistortion.getSBSUpstreamPMV(..): Use generic perspective matrix constructor (example implementation only)

3 years agoBug 1021: Refine Stereo Rendering API and OculusVR implementing renderer
Sven Gothel [Thu, 3 Jul 2014 07:35:34 +0000 (09:35 +0200)]
Bug 1021: Refine Stereo Rendering API and OculusVR implementing renderer

Refine API in regards to proper package names, interface
and high-level access to eye specific constant parameter
and variable eye movement.

+++

Commit 36327e24cf586b50bf18e87d7d13d53eb41cf1d9 introduced 'GLEventListener2'

Move javax.media.opengl.GLEventListener2
  -> com.jogamp.opengl.util.CustomRendererListener
    -> com.jogamp.opengl.util.stereo.StereoRendererListener

StereoRendererListener adds stereoscopic specific:

  public void reshapeEye(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height,
                         final EyeParameter eyeParam, final EyePose eyePose);

.. see below.

++

Add com.jogamp.opengl.util.stereo:
  - EyeParameter (Constant eye parameters, like IPD and FOV)
  - EyePose (Current eye position and orientation)

+++

Add com.jogamp.opengl.math.FovHVHalves to support
non-centered bi-directional FOV for lenses.

Add respective FloatUtil.makePerspective(.. FovHVHalves fovhv ) variant.

+++

3 years agoBug 1021: Add OculusVR distortion renderer (single FBO and dual FBO); Add GLEventList...
Sven Gothel [Tue, 1 Jul 2014 19:02:21 +0000 (21:02 +0200)]
Bug 1021: Add OculusVR distortion renderer (single FBO and dual FBO); Add GLEventListener2 (WIP); Refine FloatUtil

- GLEventListener2 extends GLEventListener adds refined control:
  - display w/ flags, i.e. repeat, don't clear
  - setProjectionModelview(..)

- FloatUtil.* Add return value for chaining, where missing

+++

- jogamp.opengl.oculusvr.OVRDistortion
  - Handles all OVR related data and maps it to shader + GL buffers
  - display method

- com.jogamp.opengl.oculusvr.OVRSBSRendererSingleFBO implements GLEventListener
  - Simple OVRDistortion renderer using single FBO
  - Using upstream GLEventListener2 (the content)

- com.jogamp.opengl.oculusvr.OVRSBSRendererDualFBO implements GLEventListener
  - Simple OVRDistortion renderer using two FBOs
  - Using upstream GLEventListener2 (the content)

Manual Test: com.jogamp.opengl.test.junit.jogl.stereo.ovr.OVRDemo01

3 years agoFix (c) header: Due to copy & paste, wrong header was used for certain files .. ...
Sven Gothel [Tue, 1 Jul 2014 16:28:18 +0000 (18:28 +0200)]
Fix (c) header: Due to copy & paste, wrong header was used for certain files .. (sorry)

3 years agoAttempt to remove aliasing from native libraries.
Mark Raynsford [Mon, 30 Jun 2014 12:45:53 +0000 (12:45 +0000)]
Attempt to remove aliasing from native libraries.

Renamed:

  jogl-core.jar         → jogl.jar
  nativewindow-core.jar → nativewindow.jar

The build scripts have been edited to produce sets of natives for
each "module" (as opposed to producing one set of natives and then
have each module point to them via aliasing).

Bug: 1023
Bug: 1024

Depends on 46faa59d439ef235d7691fc64d56eedc600ffa1a from gluegen.

3 years agoBug 1027: Fix usage of atomic jar files (NEWT)
Sven Gothel [Sun, 29 Jun 2014 06:36:09 +0000 (08:36 +0200)]
Bug 1027: Fix usage of atomic jar files (NEWT)

Issue was that 'com.jogamp.opengl.util.PNGPixelRect'
was included in jogl-core.jar and that NEWT assumes
PNG conversion is possible having this class available.

However, PNGPixelRect requires 'jogamp.opengl.util.pngj'
which is only included within jogl-util.jar.

Moved PNGPixelRect from jogl-core.jar to jogl-util.jar.

+++

Added manual test launch 'testnoawtatomics' in make/scripts/tests.sh
to test atomic usage.
Works now w/ com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT,
showing that the window/application icon is _not_ set due to not having PNG* available.

3 years agoOculusVR: Add in eclipse classpath, and jogl-java-src.zip; Also create jogl-test...
Sven Gothel [Sun, 29 Jun 2014 06:23:56 +0000 (08:23 +0200)]
OculusVR: Add in eclipse classpath, and jogl-java-src.zip; Also create jogl-test-java-src.zip

3 years agoFix 'typo' in messages: 'Catched' -> 'Caught'
Sven Gothel [Sat, 28 Jun 2014 14:07:36 +0000 (16:07 +0200)]
Fix 'typo' in messages: 'Catched' -> 'Caught'

3 years agoWIP: Add Matrix4 OO wraper for FloatUtil matrix operations
Sven Gothel [Sat, 28 Jun 2014 02:08:16 +0000 (04:08 +0200)]
WIP: Add Matrix4 OO wraper for FloatUtil matrix operations

3 years agoAdd missing FloatUtil.invertMatrix(..) unit test, which impl. changed w/ commit ee774...
Sven Gothel [Sat, 28 Jun 2014 01:07:40 +0000 (03:07 +0200)]
Add missing FloatUtil.invertMatrix(..) unit test, which impl. changed w/ commit ee774dce9e474e8ea961bd9b504d26e9321e1b15

3 years agoEnhance FloatUtil: More optimizations, concludes commit 0bded476868c5fdfe44502bfd5595...
Sven Gothel [Sat, 28 Jun 2014 01:02:25 +0000 (03:02 +0200)]
Enhance FloatUtil: More optimizations, concludes commit 0bded476868c5fdfe44502bfd55957469d0d72bb

FloatUtil optimizations (unroll and linear memeory access):
  - transposeMatrix
  - invertMatrix (diff algo as well - 50% speed bump)
  - multMatrix
  - multMatrixVec

FloatUtil added
  - matrixDeterminant(..)

FloatUtil removed
  - Certain FloatBuffer variants are removed
    or at least marked deprecated.

3 years agoEnhance FloatUtil: Merge ProjectFloat features while adding optimized variations...
Sven Gothel [Fri, 27 Jun 2014 16:16:43 +0000 (18:16 +0200)]
Enhance FloatUtil: Merge ProjectFloat features while adding optimized variations; PMVMatrix: Remove NIO buffer path, use backing-array only and FloatUtil direct.

- FloatUtil pptimized variants:
  - mapObjToWinCoords (gluProject) passing 'P x Mv' for batch operations

  - mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' for batch operations

  - mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' and two winz values
    for two ray picking resulting in two obj positions. (-> mapWinToRay)

- PMVMatrix
  - dropped low performance NIO mode
  - simply use common backing-array and fixed offsets directly
  - drop ProjectFloat usage in favor of FloatUtil
  - reduce number of temporary arrays

3 years agoGLU: Make ProjectFloat/ProjectDouble final and deprecate GLU.destroy() method.
Sven Gothel [Fri, 27 Jun 2014 06:57:09 +0000 (08:57 +0200)]
GLU: Make ProjectFloat/ProjectDouble final and deprecate GLU.destroy() method.

3 years agoProduce duplicate natives in the build, in preparation for removing
Mark Raynsford [Thu, 26 Jun 2014 15:02:32 +0000 (15:02 +0000)]
Produce duplicate natives in the build, in preparation for removing
support for aliasing in native library loading.

Specifically, produce:

  jogl-all-noawt-natives-${os_and_arch}.jar
  jogl-all-mobile-natives-${os_and_arch}.jar
  jogl-all-android-natives-${os_and_arch}.jar

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