summaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1035 - Allow Gamma [Brightness, Contrast] settings to be performed on ↵Sven Gothel2014-07-276-171/+387
| | | | | | | | | | | | | | | | | | | | | | | | | 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-28/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2714-434/+868
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-114-39/+31
| | | | Adapt to GlueGen commit f5c48efcf546ba4e08e197ccced6df83b57e1755
* StereoClientRenderer: Fix API doc anchor linkSven Gothel2014-07-101-2/+1
|
* Refine 'GLSharedContextSetter' test cases: Use ↵Sven Gothel2014-07-101-2/+8
| | | | 'setSharedAutoDrawable(sharedAutoDrawable)' where possible; Fix/Refine API doc.
* Refine commit ec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25: Call ↵Sven Gothel2014-07-101-8/+1
| | | | 'areAllGLEventListenerInitialized()' directly from GLAutoDrawable
* StereoDeviceRenderer/ClientRenderer: Add note about 'Correct Asymmetric FOV ↵Sven Gothel2014-07-102-0/+18
| | | | Rendering', using FovHVHalves - incl. references
* Bug 1031: Remove Deprecated Classes and Methods (JOGL)Sven Gothel2014-07-1021-1167/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 801: Add Graph pass-2 shader for VBAA 'odd' sample countSven Gothel2014-07-094-82/+180
|
* StereoDevice: Don't make inner class's method private due to wrapper ↵Sven Gothel2014-07-081-1/+1
| | | | generation (still, findbugs didn't report this)
* Findbugs: Comment on some issues (OK, they are) ; Remove dead branchesSven Gothel2014-07-081-2/+2
|
* Findbugs: Use static fields where possibleSven Gothel2014-07-086-7/+7
|
* Findbugs: Use inner static class where possibleSven Gothel2014-07-0812-67/+68
|
* Findbugs: Misc issues (Use private accessors of static fields; Use boolean ↵Sven Gothel2014-07-081-23/+23
| | | | operator; Avoid NPE
* AnimatorBase: Use cached synchronized value instead of unsynchronized ↵Sven Gothel2014-07-081-1/+1
| | | | (sloppy left-over code)
* Findbugs: Misc minor issues (see below)Sven Gothel2014-07-087-44/+39
| | | | | | | - remove duplicate code in branch - Use Type.valueOf(primitive) - Don't use array.toString() directly - remove dead code
* Findbugs: Add comments that FB warnings are of no concern ..Sven Gothel2014-07-084-4/+4
|
* Findbugs: Remove dead-code / unused [temp] storage and it's assignmentSven Gothel2014-07-0816-105/+121
|
* Findbugs: Remove branches where reference cannot be nullSven Gothel2014-07-088-31/+34
|
* Findbugs: Use <NumberType>.valueOf(..) instead of 'new <NumberType>(..)'Sven Gothel2014-07-0811-44/+41
|
* Fix regression of commit 96d530e7127c89db9991080e6268c6e8430d0619: ↵Sven Gothel2014-07-081-1/+1
| | | | EGLDisplayUtil.eglCreateEGLGraphicsDevice(..) call w/ uninitialized 'surface'
* Findbugs: Add FIXME comment regarding float comparison (consider using ↵Sven Gothel2014-07-081-0/+2
| | | | FloatUtil.isEqual(ax, bx, epsilon), FloatUtil.isZero(bx, epsilon), ..)
* Findbugs: Use Integer.parseInt(string) for int values to avoid boxing and ↵Sven Gothel2014-07-083-6/+6
| | | | unboxing
* Findbugs: Remove redundant instanceof checksSven Gothel2014-07-081-7/+8
|
* Findbugs.static_final_immutable: Use final qualifier for static immutable ↵Sven Gothel2014-07-086-21/+22
| | | | instances.
* GenericStereoDevice: Cast to float before operating division, requesting ↵Sven Gothel2014-07-081-3/+4
| | | | float. Base aspect-ratio on eyeTextureSize
* Findbugs.increment_volatile: Use AtomicInteger or add comment that operation ↵Sven Gothel2014-07-082-2/+2
| | | | is safe!
* Findbugs.switch-case: GLBuffers.bytesPerPixel(..) throw GLException for type ↵Sven Gothel2014-07-081-0/+3
| | | | BITMAP && format !COLOR_INDEX || !STENCIL_INDEX
* Findbugs.not-written.null: Fix referencing non-written fields (never written ↵Sven Gothel2014-07-089-37/+52
| | | | | | | | | | | | | | | 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 -
* Findbugs.synchronization: Fix double-check w/o volatile; Remove redundant ↵Sven Gothel2014-07-081-1/+1
| | | | synchronized from setter
* Findbugs.normal: Adding safeguard hashCode() implementation throwing ↵Sven Gothel2014-07-086-0/+25
| | | | | | InternalError("hashCode not designed") As long we don't use Object.hashCode() to idenitify the memory address, we can safeguard the code.
* Findbugs.minor: Fix 'array -> string', missing argumentSven Gothel2014-07-083-4/+4
|
* Bug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in ↵Sven Gothel2014-07-0720-72/+1793
| | | | | | | | | | | | | | | | | | | | | | 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-051-1/+1
|\ | | | | | | | | | | | | 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-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not ↵Sven Gothel2014-07-054-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Bug 1021: Make OVR access vendor agnostic: Package ↵Sven Gothel2014-07-0511-10/+809
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* | Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-03488-9585/+9607
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | FloatUtil.makePick(..): Refine API doc, incl. PMVMatrix.gluPickMatrix(..)Sven Gothel2014-07-032-17/+26
| |
* | Bug 1021: Refine Stereo Rendering API and OculusVR implementing rendererSven Gothel2014-07-037-41/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-37/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix 'typo' in messages: 'Catched' -> 'Caught'Sven Gothel2014-06-2818-32/+32
| |
* | WIP: Add Matrix4 OO wraper for FloatUtil matrix operationsSven Gothel2014-06-281-0/+151
| |
* | Enhance FloatUtil: More optimizations, concludes commit ↵Sven Gothel2014-06-284-577/+563
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Enhance FloatUtil: Merge ProjectFloat features while adding optimized ↵Sven Gothel2014-06-2710-1039/+1900
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | GLU: Make ProjectFloat/ProjectDouble final and deprecate GLU.destroy() method.Sven Gothel2014-06-271-1/+0
|/
* Adapt to GlueGen commit c3054a01990e55ab35756ea23ab7d7c05f24dd37 (compount ↵Sven Gothel2014-06-171-1/+1
| | | | call-by-value extension), utilizing native JVMUtil_NewDirectByteBufferCopy(..)
* Fix Bug 826 Regression caused by commit ↵Sven Gothel2014-06-131-23/+34
| | | | | | | | | | | | | 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 Bug 1019 - Remedy of Bug 691 causes 'access/modify after free' and ↵Sven Gothel2014-06-122-29/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.