summaryrefslogtreecommitdiffstats
path: root/make
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for ↵Sven Gothel2014-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | 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!
* Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while ↵Sven Gothel2014-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). +++
* Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while ↵Sven Gothel2014-07-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Refine test ff5dba28610b4f680c9320e9e52669ed54d4de43: Perform context switch ↵Sven Gothel2014-07-301-2/+2
| | | | on GL capable thread if required. Add API doc note about this requirement.
* Bug 830 - Add Heuristics for to query whether ↵Sven Gothel2014-07-302-5/+7
| | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 1038 - Fix: Allow skipping detection of certain GLProfiles: Skip ↵Sven Gothel2014-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* Bug 1038 - Allow skipping detection of certain GLProfiles: Skip ↵Sven Gothel2014-07-303-3/+7
| | | | | | | | | | | | | | | '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.
* Bug 1038 - Allow skipping detection of certain GLProfiles: Skip native core ↵Sven Gothel2014-07-291-2/+3
| | | | | | profiles via property 'jogl.disable.openglcore' Also moved all GL profile properties to GLProfile class and made them public for better documentation.
* Fix ShaderCode.es3_default_precision_fp: ES 3.x requires same precision for ↵Sven Gothel2014-07-291-2/+2
| | | | uniforms -> re-use es3_default_precision_vp; Fixes PointsDemoES2
* BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, ↵Sven Gothel2014-07-291-2/+7
| | | | | | | | | | | | | | | | | 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.
* Bug 1036: NVidia Windows Driver 'Threaded optimization' workaround. [3/3]Sven Gothel2014-07-294-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 1016 - GLJPanel Offscreen FBO size may exceed GL MAX TEXTURE SIZE, only ↵Sven Gothel2014-07-281-4/+5
| | | | | | | | | 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.
* Bug 1037 - FBObject/GLFBODrawable: Do not assume using a TextureAttachment ↵Sven Gothel2014-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()'
* Bug 1035 - Allow Gamma [Brightness, Contrast] settings to be performed on ↵Sven Gothel2014-07-272-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed and Changed NVidia Windows Driver Threaded optimization bug workaround ↵Sven Gothel2014-07-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 1033: Guarantee atomicity of high-level GLAutoDrawable operations, ↵Sven Gothel2014-07-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 1024: Add fallback for native-jar-file location via classpathSven Gothel2014-07-1111-34/+190
| | | | Adapt to GlueGen commit f5c48efcf546ba4e08e197ccced6df83b57e1755
* Refine 'GLSharedContextSetter' test cases: Use ↵Sven Gothel2014-07-101-5/+3
| | | | 'setSharedAutoDrawable(sharedAutoDrawable)' where possible; Fix/Refine API doc.
* Bug 982: Adding test TGA file for confirmation - No bugSven Gothel2014-07-101-1/+2
|
* Bug 1031: Remove Deprecated Classes and Methods (JOGL)Sven Gothel2014-07-108-56/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in ↵Sven Gothel2014-07-073-3/+10
| | | | | | | | | | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'github-mark/master' (Bug 1023/Bug 1024)Sven Gothel2014-07-057-61/+65
|\ | | | | | | | | | | | | Conflicts: make/scripts/tests.sh (build.xml: Using <copy tofile=".."/> instead of producing new jar files via <jar> to keep identity)
| * Attempt to remove aliasing from native libraries.Mark Raynsford2014-06-306-61/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Produce duplicate natives in the build, in preparation for removingMark Raynsford2014-06-261-0/+18
| | | | | | | | | | | | | | | | | | | | 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
* | Bug 1021: Make OVR access vendor agnostic: Package ↵Sven Gothel2014-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* | build: Add oculusvr java-doc ; Add jogl-test-java-src.zip in 7z archiveSven Gothel2014-07-032-1/+3
| |
* | Bug 1021: Fix remaining build issues if sub-module oculusvr-sdk is missingSven Gothel2014-07-032-0/+2
| |
* | Bug 1021: Refine Stereo Rendering API and OculusVR implementing rendererSven Gothel2014-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. +++
* | Bug 1021: Add OculusVR distortion renderer (single FBO and dual FBO); Add ↵Sven Gothel2014-07-014-10/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Bug 1027: Fix usage of atomic jar files (NEWT)Sven Gothel2014-06-293-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | OculusVR: Add in eclipse classpath, and jogl-java-src.zip; Also create ↵Sven Gothel2014-06-291-0/+5
| | | | | | | | jogl-test-java-src.zip
* | Enhance FloatUtil: More optimizations, concludes commit ↵Sven Gothel2014-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | GLU: Make ProjectFloat/ProjectDouble final and deprecate GLU.destroy() method.Sven Gothel2014-06-273-12/+9
|/
* Fix build if oculusvr-sdk submodule is missingSven Gothel2014-06-251-1/+1
|
* Bug 1021: OVR GlueGen Mapping: Handle non-existent native oculusvr lib ↵Sven Gothel2014-06-252-20/+35
| | | | | | | gracefully - query isAvailable() in ovr_Initialize(), ovrHmd_Create(..) and ovrHmd_CreateDebug(..) and return appropriate values.
* Bug 1021: OVR GlueGen Mapping: Compile all generated C files, add missing C ↵Sven Gothel2014-06-253-0/+9
| | | | ovrHmdStruct in generated files, reduce warnings.
* Bug 1021: Enhance OVR GlueGen Mapping / Adapt to GlueGen commit ↵Sven Gothel2014-06-254-10/+29
| | | | 9ee44e1a289ecbac024662dd5a2ffc42e8add023 (Bug 1025)
* Bug 1021: Add OculusSDK binding (Bring-up on OSX w/ clang/clang++ ; Split ↵Sven Gothel2014-06-202-21/+55
| | | | | | | | | | | | | | native build: cc, c++, linkage) - Bring-up on OSX w/ clang/clang++ - Build and tested on OSX 10.9 - Split native build: cc, c++, linkage - Perform steps sequentually to not differentiate c and c++ compiler as required for clang/clang++ - compile c code - compile c++ code - link all object files
* Bug 1021: Add OculusSDK binding / Basic OVR support (Bring-up on Windows w/ ↵Sven Gothel2014-06-207-112/+74
| | | | | | | | | | | | | | | | | Mingw64 ; Solve static linkage of stdc++) - Bring-up on Windows w/ Mingw64 - Bumped oculusvr-sdk to commit 70e44b846ceaf9eebc336b12a07406c3a418a5c3 - Added required mingw64 linker statments - Builds and runs on x86_64 and i386 - Solve static linkage of stdc++ - "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" MUST come AFTER all object files!! - No more manual '--undefined=symbol' required .. puhh :) - Cleanup linker cfg .. - Still runs on GNU/Linux x86_64 and i386
* Bug 1021: Add OculusSDK binding / Basic OVR support (Refine build exclusion)Sven Gothel2014-06-193-5/+22
| | | | | | | | | | common: - property 'oculusvr.sdk.available' is only set if sub-module 'oculusvr-sdk' is available - if 'oculusvr.sdk.available' is not set build.xml will not issue build-oculusvr.xml's 'all' target build-oculusvr.xml: - propery 'oculusvr.build.enabled' is only enabled if 'oculusvr.sdk.available' is set and targer 'all' will only pass if set.
* Bug 1021: Add OculusSDK binding / Basic OVR supportSven Gothel2014-06-1911-27/+819
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring-up test only initializes the ovrHmdHandle data structure by OVR native code. See com.jogamp.oculusvr.OVRVersion Current evaluation build compiles all OVR-SDK source files itself w/o using provided libovr.a. We also skip the GL dependent renderer of the SDK, i.e. we prefer to utilize our JOGL 'barrel distortion' renderer. This eases the 'chicken-egg' problem of OVR SDK dependencies, i.e. libGL, libGLESv2 .. etc Since the OVR source code is C++, we may still have to figure out how to / and whether we shall link libstdc++ statically to remove platform dependencies. Right now we link libstdc++ statically if using GCC, see make/build-oculusvr.xml (hackish .. TODO: better way to include all symbols). Same consideration applies to GNU/Linux and libudev.so dependency, since there are: - libudev.so.0 and (Older distri's) - libudev.so.1 (Debian8, ..) ... Produced JAR artifacts are - jar/atomic/oculusvr.jar - jar/atomic/oculusvr-natives-<os.and.arch>.jar i.e. only in 'atomic' variants to not bloat the default 'all' JAR files. .... make/build-oculusvr.xml Notes: - Currently native build only enabled on GNU/Linux (isLinux) - Force disable native build via property 'c.build.oculusvr.skip'
* Adapt to GlueGen commit 2f6586292cd298bbc19d8acda0f7cf303c82078b (compount ↵Sven Gothel2014-06-187-7/+8
| | | | | | | call-by-value extension) - GLU*: initializeImpl() is no more required, since it's not forced .. uncomment in manual static initializer - GLX: 'ForceStaticInitCode GLX', i.e. forcing native code, as used in our manual implementation.
* Fix regression due to GlueGen commit ↵Sven Gothel2014-06-177-4/+20
| | | | | | | | | | | | | | c3054a01990e55ab35756ea23ab7d7c05f24dd37, completes JOGL commit 68ca3ae8fcce28c62034299bc6e6f7eaab50bd1f Add handling of 'initializeImpl()' of generated GLU* classes: - GLU : no 'initializeImpl()' <- no libs - GLUgl2es1: no 'initializeImpl()' <- no libs - GLUgl: call 'initializeImpl()' in manual static init impl. Further more, we shall not initialize the GLU* classes in GLU static init method, querying GLU* class availability. Tested via OlympicES1.
* Adapt to GlueGen commit c3054a01990e55ab35756ea23ab7d7c05f24dd37 (compount ↵Sven Gothel2014-06-171-69/+6
| | | | call-by-value extension), utilizing native JVMUtil_NewDirectByteBufferCopy(..)
* Fix Bug 826 Regression caused by commit ↵Sven Gothel2014-06-132-4/+4
| | | | | | | | | | | | | 41190c3830157abdf9649cbf7767e57108f55075 (Bug 975) Commit 41190c3830157abdf9649cbf7767e57108f55075, fix for 'Bug 975 GLJPanel's OffscreenDrawable double swap', caused a regression of commit c427ed22244df44b71a0f1f000b0f93e56c283c2, fix for 'Bug 826: GLJPanel: Fully restore TextureState and Viewport'. Commit 41190c3830157abdf9649cbf7767e57108f55075 issues offscreenDrawable.swapBuffers() and hence modifying the texture unit settings before saving the TextureState, the whole purpose of commit c427ed22244df44b71a0f1f000b0f93e56c283c2.
* Fix NEWT EDTUtil Deadlock on EDTUtil.start()Sven Gothel2014-06-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | DisplayImpl.runOnEDTIfAvail(..) issues EDTUtil.start() while holding it's object-lock - if the EDT is not running, then invokes the given task. EDTUtil.start() impl. holds it's own edt-lock while starting, then releases it's edt-lock while issuing a null-task. If another thread injects a blocking task right in-between which also acquires the display's object-lock it deadlocks. Simply remove issuing the null-task, so EDTUtil.start() can return immediatly (releasing edt-lock) and allowing DisplayImpl.runOnEDTIfAvail(..) also to release it's object-lock. The other threads task then can be executed, where the 'starting task' would come second - which is OK, even though a rare occasion. Above situation was triggered via AWT/NEWT reparenting w/ forced recreation via TestParenting01dAWT. +++ The null-task at EDTUtil.start() was remaining code to ensure that the EDT completed starting, which is redundant.
* Fix Bug 1019 - Remedy of Bug 691 causes 'access/modify after free' and ↵Sven Gothel2014-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes the app The 'magic' MyNSOpenGLContext::dealloc (MacOSXWindowSystemInterface-calayer.m) of force destroying the underlying CGLContextObj of it's associated NSOpenGLContext as introduced as a remedy of Bug 691 is plain wrong. It was added in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161 to mitigate the experience behavior of delayed GL context destruction when creating/destroying them multiple times as exposed in unit test TestGLCanvasAddRemove01SwingAWT. While this 'hack' worked for some reason on some OSX versions, it caused a 'access/modify after free' issue exposed under some circumstances and crashes the application. The actual culprit of the delayed GL context destruction is different. The offthread CALayer detachment and hence final destruction issued on the main-thread is _not_ issued immediately due to some referencing holding by NSApp. Issuing an empty event on the NSApp (thread) will wake up the thread and release claimed resources. This has been found while realizing that the GL context are released if the mouse is being moved (duh!). This issue is also known when triggering stop on the NSApp (NEWT MainThread), same remedy has been implemented here for a long time.
* GraphUI Demo: Analyze issue w/ OSX and NewtCanvasAWT when rendering / ↵Sven Gothel2014-06-111-2/+2
| | | | | | | | | | animating GLEventListenerButton Analyze issue w/ OSX and NewtCanvasAWT when rendering / animating GLEventListenerButton. FBO of main 'window' is _not_ updated .. Probably related to CALayer - FBO - FBO* (of this button) ..
* Graph RegionRenderer: Fix GL3 and ES3 GLSL issuesSven Gothel2014-06-111-11/+3
| | | | | | Macro redefine 'texture2D -> texture' was added _after_ the custom texture lookup insertion causing GL3-core to fail.
* Bug 1011 / Bug 1012: GLMediaPlayer Audio/Video stuttering w/ OSX and ↵Sven Gothel2014-06-113-9/+20
| | | | OpenAL/JOAL (works using openal-soft default on all platforms now)