aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1068 - Allow GLContext creation and makeCurrent without default ↵Sven Gothel2014-12-071-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | framebuffer (Part 2); Bug 896: EGL_KHR_create_context (Part 1) Bug 1068 - Allow GLContext creation and makeCurrent without default framebuffer (Part 2) Implement surfaceless context on EGL and GLX/X11 utilizing *UpstreamSurfacelessHook as introduced in commit 9ea218a5990b908e04235c407c0951c60df6ffba. Surfaceless context is probed during GL profile probing by default. If available, it will be used for offscreen FBO drawables. If probing fails, or is disabled, the new GLRendererQuirks.NoSurfacelessCtx is set. - GLProfile.disableSurfacelessContext disables surfaceless context probing, set property 'jogl.disable.surfacelesscontext' Tested: - Mesa/EGL works, - Mesa + NVidia w/ GLX fail on GNU/Linux): Fails NoSurfacelessCtx - TODO: Windows impl. and more tests +++ Bug 896: EGL_KHR_create_context (Part 1) - Detect EGL_KHR_create_context capability and utilize if available. - Implement EGLContext.createContextARBImpl(..), allowing native DEBUG context usage, where available. - EGL implements SharedResourceRunner, i.e. probing profiles on dedicated thread using common interface. - Probe desktop profile/context ability in EGLDrawableFactory SharedResourceRunner, Where EGLGLnDynamicLibraryBundleInfo covers EGL + desktop GL. - TODO: Tests w/ capable implementation
* Bug 1107 - Refine PixelFormat, GLPixelBuffer and ↵Sven Gothel2014-12-067-224/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectDataBufferInt/BufferedImageInt - PixelFormat Refine definition allowing complete format conversion by its attributes instead of static 'knowledge'. - PixelFormat has_a *new* PixelFormat.Composition - PixelFormat.Composition contains all pixel component layout information as required for inspection and conversion. Component names are enumerated via PixelFormat.CType. - PixelFormatUtil.convert(..) utilizes generic conversion based on PixelFormat.Composition rather static type mapping. However, a int32 RGBA static conversion is still supported for performance. Utilizes Bitstream for varying pixel component bit-width. - Complete w/ hashCode() and equals(..) - GLPixelBuffer - Take 'pack' mode into account when determine GLPixelAttributes, i.e. on GLES pack=true (e.g. glReadPixel) only RGBA is guaranteed to work. Hence querying GLPixelAttributes requires the GLProfile, PixelFormat and pack mode. - Complete GLPixelAttributes conversions from PixelFormat or GL format/data-type, while taking GL data-type into account, as well as pack-mode. - Complete w/ hashCode() and equals(..) - SingletonGLPixelBufferProvider queries singleton GLPixelBuffer via - PixelFormat.Composition hostPixelComp, - GLPixelAttributes pixelAttributes, - boolean pack which comprise a unique key, allowing the implementation to utilize a hash map. This is implemented in AWTSingletonGLPixelBufferProvider. This allows distinct singleton GLPixelBuffer for different host PixelFormat (conversion) and GLPixelAttributes (depending on GLProfile). - Removes field 'componentCount' which was 'hacked in' to pass information about an optional host memory layout. Implementations utilizing conversion, e.g. AWTGLPixelBuffer, can implement GLPixelBufferProvider's 'PixelFormat.Composition getHostPixelComp(final GLProfile glp, final int componentCount)' and manage such implementation details, see use-case GLJPanel. - DirectDataBufferInt/BufferedImageInt: Expose underlying NIO ByteBuffer - AWTMisc.createCursor(..) uses DirectDataBufferInt.BufferedImageInt exposed NIO ByteBuffer, allowing to use generic PixelFormatUtil.convert(..).
* Minor Cleanup (FBObject, GLBase)Sven Gothel2014-12-061-4/+1
| | | | | | FBObject: Remove redudant case GLBase: Add API doc reference to GLContext implementation
* Use ExceptionUtils.dumpStack(..) instead of Thread.dumpStack()Sven Gothel2014-10-265-13/+20
|
* GLContext.Version* VersionNumber Constants: Clarify names, avoiding ↵Sven Gothel2014-10-252-2/+2
| | | | mis-interpretation alike Version130 -> [ 1.3.0 | 1.30.0 ] ?
* FloatUtil.makeFrustum(..): Add throws GLException API doc / Add GLException ↵Sven Gothel2014-10-253-10/+39
| | | | | | | | | | | | | if zNear == zFar throws GLException with GL_INVALID_VALUE if zNear is <= 0, or zFar < 0, or if left == right, or bottom == top, or zNear == zFar Add note on callers: - FloatUtil.makePerspective(..) - Matrix4.* - PMVMatrix.* - ProjectFloat.*
* Fix GLContext.Version* regression: Use Version1_1 and Version1_2 for 1.1 and ↵Sven Gothel2014-10-122-16/+16
| | | | | | | | | | | | | | | 1.2 (Version110 and Version120 are for 1.10 and 1.20 GLSL) Following commit introduced the wrong version usage, where a comparison w/ 1.1 and 1.2 was intended. Commit 6363fccee219ce238b0b2ded39c116e2bc8613d5 GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei states Commit 73a4d809f92126228b64a3bded75686db806be64 Don't utilize glPixelStorei's PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES for Desktop GL < 1.2, avoiding GL-Error Commit f358c49418e95c622d50eb29f53c60dc4dbdee5b Bug 1047 - jogamp.opengl.glu.mipmap.Mipmap now uses already parsed GL version number and GL profile selection
* Graph/Math: Fix minor apidoc issuesSven Gothel2014-10-094-14/+28
|
* ShaderCode: Fix link to create(..) methodSven Gothel2014-10-081-3/+3
|
* Bug 1088: Add GLRendererQuirks.NeedSharedObjectSync; Tests: Synchronize GL ↵Sven Gothel2014-10-081-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | objects if GLRendererQuirks.NeedSharedObjectSync is set. GLSharedContextSetter#synchronization GL Object Synchronization Usually synchronization of shared GL objects should not be required, if the shared GL objects are created and immutable before concurrent usage. However, using drivers exposing GLRendererQuirks.NeedSharedObjectSync always require the user to synchronize access of shared GL objects. Synchronization can be avoided if accessing the shared GL objects exclusively via a queue or com.jogamp.common.util.Ringbuffer, see GLMediaPlayerImpl as an example. +++ GLRendererQuirks.NeedSharedObjectSync is set for all OSX versions +++ Handle GLRendererQuirks.NeedSharedObjectSync in user code! +++ All shared context tests passed on OSX 10.9.5, and GNU/Linux w/ Nvidia + Mesa/AMD driver.
* GLRendererQuirks: Align wording in API docSven Gothel2014-10-081-13/+19
|
* AnimatorBase thread-name: Add instance sequence numberSven Gothel2014-10-071-2/+5
|
* Fix of the bug 1078Julien Gouesse2014-10-011-2/+18
|
* Bug 1078: Add Fallback in AWTPrintLifecycle.setupPrint(): Use Onscreen GLAD ↵Sven Gothel2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | if Offscreen-GLAD Realization throws an Exception (Stability) - GLDrawableFactoryImpl: createOffscreenDrawable(..) and createDummyAutoDrawable(..) Temporary catch exception during setRealized(true) of newly created GLDrawable, to unrealize the instance before propagating the exception. This handling removes a memory leak in case the exception of this method is handled and application continues to operate, e.g. as in AWTPrintLifecycle.setupPrint(). The underlying drawable gets unrealized, since it's setRealized(boolean) implementation toggles its realize-state before delegating the realize-operation. Hence this is functional. - AWTPrintLifecycle.setupPrint() Stability Catch exception thrown by factory.createOffscreenAutoDrawable(..)'s setRealize(true) to continue operation w/ onscreen GLAD.
* Fix future compatibility issues (analog to b22x commit ↵Sven Gothel2014-09-242-9/+9
| | | | | | | | | | | | | | 546f9b1a03c46b63f8bb18c1b8e2c80a8b66cf7c) - GLFBODrawable: - Remove FBOMODE_DEFAULT - GLRendererQuirks: - Remove COUNT - Add getCount() method for future compatibility. - Animator - Hide local fields (private or package private)
* Fix synchronization issues in Animator* Exception caseSven Gothel2014-09-233-74/+77
| | | | | | | | | | | | | | | | | | | | | | | Refines commit cef7ba607ad7e8eb1ff2a438d77710a29aa0bda6 - The animator monitor-lock was still hold in the post finally block issuing flushGLRunnables(), due to intrinsic monitor release (in finally): - <http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html#jvms-2.11.10> - <http://stackoverflow.com/questions/10743285/behavior-of-a-synchronized-method-with-try-and-finally> - Further: AnimatorBase.flushGLRunnables() acquired the lock itself (duh!) This commit removes the requirement for finally altogether by simply return a boolean from handleUncaughtException(caughtException), where false denotes the caller to propagate the exception itself (no handler). Post synchronized block then issues flushGLRunnables() and exceptation propagation as required. AnimatorBase.flushGLRunnables() 'synchronized' modifier is removed. Further, ThreadDeath is being propagated if caught. Here the finally block is also removed - redundant.
* Fix synchronization issues in GLDrawableHelper.flushGLRunnables(), fixes ↵Sven Gothel2014-09-223-40/+60
| | | | | | | | | | | | | | | | | | | | | rare deadlock with animator-exception and invoke(wait=true, ..) Fix synchronization issues in GLDrawableHelper.flushGLRunnables(): - Querying 'glRunnables.size()' is not synchronized, only its reference is volatile, not the instance's own states. - 'flushGLRunnable()' must operates while acquired the 'glRunnable' lock. - 'glRunnables' are no more volatile - introduced volatile 'glRunnableCount', allowing 'display(..)' method to pre-query whether blocking 'execGLRunnables(..)' must be called. This is risk (deadlock) free. Also fixes rare deadlock in animator display-exception / GLAD.invoke(wait=true, ..) case: - 'GLDrawableHelper.invoke(.., GLRunnable)' acquires the 'glRunnable' lock. - Then it queries animator state, which is blocking. - Hence animator's 'flushGLRunnable()' call must happen outside the animator lock
* Stabilize, fix regression: GLDrawable.invoke(..) and Animator* display-loop ↵Sven Gothel2014-09-222-8/+14
| | | | | | | | | | | | | | | 'closure' GLDrawable.invoke(..) regression of commit c77b8f586cb2553582a42f5b90aeee5ef85f1efe: 'wait' was not set to false, if 'deferredHere' was forced to 'false'. This could lead to the situation where GLRunnableTask will catch the exception and supresses it. Animator/FPSAnimator post exception propagation code animThread = null; notifyAll(); must be complete to finalize animator state in case of an exception. Decorate 'handleUncaughtException(..)' w/ try { } finally { } where the latter ensures the mentioned 'closure'.
* Bug 1066: Reduce glGetError() in FBObject / GLFBODrawableImplSven Gothel2014-09-211-24/+37
| | | | | | | | | | | | | | | - GLFBODrawableImpl - cache getMaxRenderbufferSamples() result from initialize call, method checks glGetError() - FBObject - init(..): Remove one redundant checkPreGLError() - Allow reset(..) / modify-attachment-operations w/o glGetError(): - Only check error if DEBUG || GLContext.DEBUG_GL: - RenderAttachment.initialize() - TexureAttachment.initialize() - syncSamplingSink(gl)
* Bug 1073: FBObject/GLFBODrawable: Remove deprecated methodsSven Gothel2014-09-201-56/+3
| | | | | | | | | | - dual-use reset(..), use dedicated init(..) and reset(..) - GLFBODrawable.FBOMODE_USE_DEPTH: Use GLCapabilities.[get|set]DepthBits(int) Note: Applications shall use _requested_ GLCapabilities, if passing caps down to the GLFBODrawable. Otherwise (using _chosen_ caps) we may end up in requesting properties not desired, e.g. stencil bits, if driver has chosen.
* FBObject: Fix depth- and stencil bit count selection for attachRenderbuffer(..);Sven Gothel2014-09-202-41/+95
| | | | | | | | | | | | | | | - Fix depth- and stencil bit count selection for attachRenderbuffer(..) - Add generic values: DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS, MAXIMUM_BITS - Refactor depth- and stencil bit-count -> format into own method - Allow depth- and stencil bit-count select a higher bit-count if required (fix) - GLFBODrawable.FBOMODE_USE_DEPTH is deprecated, using GLCapabilities.[get|set]DepthBits(..) - It was an oversight to introduce the bit flag in the first place, since we should have used the capabilities depth bit-count - Graph Test: GLEventListenerButton shall use requested capabilities for FBO drawable.
* FBObject: Simplify API (init/reset); Only issue automatic ↵Sven Gothel2014-09-202-172/+367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resetSamplingSink(..) if required; Fix resetSamplingSink(..), isBound(), .. - Simplify API (init/reset) - use new unique methods for init and reset: - void init(final GL gl, final int newWidth, final int newHeight, final int newSamples) - does not issue resetSamplingSink(..) - boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples) - always issues resetSamplingSink(..) - deprecated dual-use (init/reset): - boolean reset(final GL gl, final int newWidth, final int newHeight) - boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) - reset(..) no more creates a dummy 'samplingSink' instance if sampling > 0, left up to resetSamplingSink(..) - Track 'modified' state of FBObject, if size, format or any attachment has been changed since last - use(..) - syncSamplingSink(..) - resetSamplingSink(..) - Only issue resetSamplingSink(..) from syncSamplingSink(..)/use(..) if 'modified == true' +++ - Fix setSamplingSink(..), i.e. samplingSink state handling: - Validated whether given samplingSink is initialized, throws Exception if not. - Fix resetSamplingSink(..) - resets the bound state, i.e. leaves it untouched - also unbinds the samplingSink - sampleSinkDepthStencilMismatch() also returns true if this.depth/stencil == null, but samplingSink is not. - Newly created colorbuffer/-texture matches exiting colorbuffer's internal-format, if exists. - Using simplified resetSizeImpl(..) for size mismatch - Simplified samplingColorSink init check - Fix isBound() was: 'bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' fix: 'bound = bound && fbName == gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' - Fix detachRenderbuffer(..) validates whether detachment was successful, similar to detachColorbuffer(..)
* StereoClientRenderer: Remove redundant FBObject.detachAllColorbuffer(gl) for ↵Sven Gothel2014-09-191-1/+0
| | | | init call
* New GLRendererQuirks.BuggyColorRenderbuffer: On Mesa 7.2 software, FBO color ↵Sven Gothel2014-09-191-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | renderbuffer may cause a crash Workaround crash caused by Mesa 7.2 software rendering using color renderbuffer target in FBO. If Mesa < 8.0 and software - or - property 'jogl.fbo.force.nocolorrenderbuffer' is set, set quirks: - GLRendererQuirks.BuggyColorRenderbuffer - GLRendererQuirks.NoFullFBOSupport (to disable MSAA) GLFBODrawable always uses FBOMODE_USE_TEXTURE if GLRendererQuirks.BuggyColorRenderbuffer is set. +++ Crash Report: GNU C Library : 2.13 stable OpenGL : software Operating System : Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 Processor ID : x86 Family 6 Model 44 Stepping 2, GenuineIntel Abnormal termination: Segmentation violation Register State (from fault): RAX = 00000000ff1818f0 RBX = 00000000beaf8afc RCX = 0000000000000004 RDX = 00007f85ed9c9010 RSP = 00007f8252d24fd0 RBP = 00007f8252d25020 RSI = 0000000017b9b330 RDI = 0000000015bca400 R8 = 0000000000000000 R9 = 00007f81edcd3014 R10 = 00007f823565f6ce R11 = 00007f827bee49aa R12 = 0000000000001406 R13 = 0000000000000001 R14 = 00000000154d5458 R15 = 00000000154d4f10 RIP = 00007f823565f7bc EFL = 0000000000010206 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): [ 0] 0x00007f823565f7bc put_row_ubyte4 at /mesa/main/renderbuffer.c:665 (in /lib/libGL.so.1) [ 1] 0x00007f8235727239 _swrast_write_rgba_span at /mesa/swrast/s_span.c:1450 (in /lib/libGL.so.1) [ 2] 0x00007f823574b071 smooth_rgba_triangle at /mesa/swrast/s_tritemp.h:862 (in /lib/libGL.so.1) [ 3] 0x00007f82357155f0 _swrast_Triangle at /mesa/swrast/s_context.c:692 (in /lib/libGL.so.1) [ 4] 0x00007f8235771780 triangle_offset_twoside_rgba at /mesa/swrast_setup/ss_tritmp.h:188 (in /lib/libGL.so.1) [ 5] 0x00007f82356d2cea _tnl_render_poly_elts at /mesa/tnl/t_vb_rendertmp.h:313 (in /lib/libGL.so.1) [ 6] 0x00007f82356d335e _tnl_RenderClippedPolygon at /mesa/tnl/t_vb_render.c:244 (in /lib/libGL.so.1) [ 7] 0x00007f82356c9313 clip_tri_4 at /mesa/tnl/t_vb_cliptmp.h:230 (in /lib/libGL.so.1) [ 8] 0x00007f82356cd026 clip_render_triangles_verts at /mesa/tnl/t_vb_rendertmp.h:163 (in /lib/libGL.so.1) [ 9] 0x00007f82356d37d9 run_render at /mesa/tnl/t_vb_render.c:320 (in /lib/libGL.so.1) [ 10] 0x00007f82356c2436 _tnl_run_pipeline at /mesa/tnl/t_pipeline.c:158 (in /lib/libGL.so.1) [ 11] 0x00007f82356c37da _tnl_draw_prims at /mesa/tnl/t_draw.c:402 (in /lib/libGL.so.1) [ 12] 0x00007f82356b673a vbo_exec_DrawArrays at /mesa/vbo/vbo_exec_array.c:263 (in /lib/libGL.so.1) [ 13] 0x00007f823583e5b0 glDrawArrays at /mesa/glapi/glapitemp.h:1645 (in /lib/libGL.so.1) +++
* GLContextImpl.setRendererQuirks(..): Use GLRendererQuirks.addQuirk(int), ↵Sven Gothel2014-09-191-0/+20
| | | | | | dropping usage of .addQuirks(int[] quirks, offset, len) Directly adding a quirk allows dropping usage of erroneous fixed-sized int[] array for accumulated quirks.
* FBObject.reset(..): Return true if modified, otherwise falseSven Gothel2014-09-181-13/+32
|
* FPSAnimator: Remove toString() override as accidently added in commit ↵Sven Gothel2014-09-141-5/+0
| | | | fa0115efb3989c28af21fc5f570ae49723566107
* FPSAnimator: Align code and pause/resume conditions w/ Animator, simplifying ↵Sven Gothel2014-09-131-29/+37
| | | | review.
* AnimatorBase.finishLifecycleAction(): Non blocking call shall return true, ↵Sven Gothel2014-09-132-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | success - otherwise pause()/.. return value is inconsistent. Caller of e.g. pause() running on the anim-thread or AWT-EDT (AWTAnimatorImpl) will be non-blocking. Before this change, a non-blocking simply did not wait until the 'hold' condition is reached and returned its negated value. This ofc is 'false', indicated unsuccessful operation. Caller use the return value to determine whether the call actually paused (or ..) the animator. Despite the non-blocking nature, the pause state was set, even if not reached. Hence a resume() would be required to continue operation after a temporary pause. +++ This change ignores the non-blocking nature's unmet condition. finishLifecycleAction() returns !nok || !blocking, i.e. either true for the reached condition (blocking) or true if non-blocking. Blocking calls with unmet condition still return false. +++ In case an animated GLAutoDrawableis being pulled after a non-blocking animator pause() call, the GLAutoDrawable's implementation thread-safety must ensure proper operation. +++
* GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei ↵Sven Gothel2014-09-091-5/+9
| | | | states
* GLPixelStorageModes: Emphasize reset*() usage; setUnpackRowLength: GL2ES2 -> ↵Sven Gothel2014-09-093-32/+14
| | | | | | | | | | GL2ES3; Better adoption of GLPixelStorageModes (GLJPanel, GLReadBufferUtil, TextureIO) - Emphasize reset*() is being called when saving modes for 1st modification; - setUnpackRowLength: GL2ES2 -> GL2ES3; Actually GL2ES3 is required for UNPACK_ROW_LENGTH - Better adoption of GLPixelStorageModes (GLJPanel, GLReadBufferUtil, TextureIO)
* Don't utilize glPixelStorei's PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES for ↵Sven Gothel2014-09-092-8/+16
| | | | | | | | | | | | | | Desktop GL < 1.2, avoiding GL-Error Commit fc1e98790a02b4fa7922f3cdd9d437f87d7c99e5 added handling of PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES in GLPixelStorageModes. However, it has been overseen that the four states are not available in OpenGL 1.1. Adding exclusion of the same if desktop GL < 1.2 and hence avoiding GL errors. Same applies to GLBuffers.sizeof(..) method.
* 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
|
* 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
* Bug 1037 - FBObject: Add proper attachment size validation at init, reset ↵Sven Gothel2014-07-281-13/+43
| | | | and attachColorbuffer(..) / attachRenderbuffer(..)