aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1063: Uri adoptionSven Gothel2014-09-082-17/+28
| | | | | | | | | - ShaderCode: - Using Uri - Also encode the rel. 'includeFile' (was missing earlier) - GLMediaPlayer - Exposes Uri in API, removed URI
* Adding missing '@since 2.2.1' tags to ShaderCode and GLContextSven Gothel2014-09-031-4/+20
|
* Bug 1043 - Add Tessellation Control and Evaluation Shader SupportSven Gothel2014-09-021-16/+56
| | | | | - Add GL4.GL_TESS_CONTROL_SHADER and GL4.GL_TESS_EVALUATION_SHADER support for GLSL util class ShaderCode - Add unit test TestTessellationShader01GL4NEWT, testing TessellationShader01aGL4 and TessellationShader01bGL4
* Bug 1017 - TextureIO.write(Texture, File) throws GLException Not a GL2 ↵Sven Gothel2014-09-011-1/+5
| | | | | | implementation on GL3 contexts _gl.getGL2() -> _gl.getGL2GL3()
* FBObject Cleanup: Add comments about maxSamples > 0 implies fullFBOSupport; ↵Sven Gothel2014-08-311-14/+11
| | | | | | | | | bind(): Set dedicated read/write if fullFBOSupport - Add comments about maxSamples > 0 implies fullFBOSupport - bind(): Set dedicated read/write if fullFBOSupport as done in syncSamplingSink() and unbind()
* GLSharedContextSetter: Fix API doc and all html references (fix URL and ↵Sven Gothel2014-08-292-0/+13
| | | | complete notes in all implementations)
* glsl.sdk.CompileShader: Use IOUtil.StreamMonitorSven Gothel2014-08-281-33/+1
|
* graph/font: Use 'pixelSize' var-name, remove redundanciesSven Gothel2014-08-281-4/+39
|
* Fix commit b5910f18f0b82a8a1f6f6252dc19971d5e487f39 for toString(): Call ↵Sven Gothel2014-08-282-0/+11
| | | | super.hashCode(), due to InternalError("hashCode not designed")
* Bug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for ↵Sven Gothel2014-08-072-1/+22
| | | | | | | | | | | | | | | | | | | | 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: Rename GLAnimatorControl.UncaughtGLAnimatorExceptionHandler -> ↵Sven Gothel2014-08-061-3/+3
| | | | GLAnimatorControl.UncaughtExceptionHandler
* Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while ↵Sven Gothel2014-08-066-49/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-08-051-2/+34
| | | | | | | | | | | | | 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.
* Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while ↵Sven Gothel2014-07-311-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 830 - Refine Heuristics for to query whether ↵Sven Gothel2014-07-311-11/+28
| | | | GLDrawableUtil.swapGLContextAndAllGLEventListener is safe: Add Accumulator Buffer bits
* GLDrawable: Expose getRequestedGLCapabilities() (Include to public API)Sven Gothel2014-07-311-6/+2
| | | | | | | | | | 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.
* Refine test ff5dba28610b4f680c9320e9e52669ed54d4de43: Perform context switch ↵Sven Gothel2014-07-301-2/+18
| | | | on GL capable thread if required. Add API doc note about this requirement.
* Bug 830 - Add Heuristics for to query whether ↵Sven Gothel2014-07-301-0/+31
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix ShaderCode.es3_default_precision_fp: ES 3.x requires same precision for ↵Sven Gothel2014-07-291-2/+6
| | | | uniforms -> re-use es3_default_precision_vp; Fixes PointsDemoES2
* BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, ↵Sven Gothel2014-07-291-149/+115
| | | | | | | | | | | | | | | | | 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 1037 - FBObject: Add proper attachment size validation at init, reset ↵Sven Gothel2014-07-281-13/+43
| | | | and attachColorbuffer(..) / attachRenderbuffer(..)
* Bug 1037 - FBObject/GLFBODrawable: Do not assume using a TextureAttachment ↵Sven Gothel2014-07-282-145/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-53/+63
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 1033: Guarantee atomicity of high-level GLAutoDrawable operations, ↵Sven Gothel2014-07-274-331/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-111-1/+1
| | | | Adapt to GlueGen commit f5c48efcf546ba4e08e197ccced6df83b57e1755
* StereoClientRenderer: Fix API doc anchor linkSven Gothel2014-07-101-2/+1
|
* 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-105-610/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-16/+27
|
* Findbugs: Use static fields where possibleSven Gothel2014-07-082-3/+3
|
* Findbugs: Use inner static class where possibleSven Gothel2014-07-081-1/+1
|
* 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-081-1/+1
| | | | | | | - 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-082-2/+2
|
* Findbugs: Remove dead-code / unused [temp] storage and it's assignmentSven Gothel2014-07-081-1/+1
|
* Findbugs: Remove branches where reference cannot be nullSven Gothel2014-07-082-6/+8
|
* Findbugs: Use <NumberType>.valueOf(..) instead of 'new <NumberType>(..)'Sven Gothel2014-07-085-22/+19
|
* Findbugs.static_final_immutable: Use final qualifier for static immutable ↵Sven Gothel2014-07-083-11/+10
| | | | instances.
* 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-081-1/+4
| | | | | | | | | | | | | | | 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-085-0/+21
| | | | | | 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-081-1/+1
|
* Bug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in ↵Sven Gothel2014-07-079-72/+269
| | | | | | | | | | | | | | | | | | | | | | 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-053-61/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-059-9/+782
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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-03110-3311/+3324
| | | | | | | | | | | | | | | | | | | | | | | | | | 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