aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Bug 1066: Reduce glGetError() in FBObject / GLFBODrawableImplSven Gothel2014-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-2/+2
| | | | | | | | | | | | | | | | | | | | - 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-204-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-203-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(..)
* | New GLRendererQuirks.BuggyColorRenderbuffer: On Mesa 7.2 software, FBO color ↵Sven Gothel2014-09-192-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-61/+58
| | | | | | | | | | | | dropping usage of .addQuirks(int[] quirks, offset, len) Directly adding a quirk allows dropping usage of erroneous fixed-sized int[] array for accumulated quirks.
* | GLFBODrawableImpl: Utilize common self-contained setupFBO(..) method for FBO ↵Sven Gothel2014-09-181-81/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | creation incl. Bug 1020 glClear(..) ; Fixes missing fbo.unbind(gl) Utilize common self-contained setupFBO(..) method for FBO creation incl. Bug 1020 glClear(..) initialize(..) and reset(..)'s fallback code contained duplicated FBO setup/creation code. The former was updated to suite the new FBO mode bits, where the latter left untouched, hence was buggy. Now setup and creation of a single FBO has been merged into setupFBO(..). Fixes missing fbo.unbind(gl): We did no issue unbind() on each fbo instance while adding the workaround for Bug 1020. Adding fbo.markUnbound() call to all fbos but the last. Note: This might not cause any issues, since fbo.bind(gl) tests the currently bound fbo.
* | Bug 1063: Uri adoptionSven Gothel2014-09-084-23/+22
| | | | | | | | | | | | | | | | | | - ShaderCode: - Using Uri - Also encode the rel. 'includeFile' (was missing earlier) - GLMediaPlayer - Exposes Uri in API, removed URI
* | Bug 1047 - jogamp.opengl.glu.mipmap.Mipmap now uses already parsed GL ↵Sven Gothel2014-09-081-2/+3
| | | | | | | | | | | | version number and GL profile selection Since Bug 1047 didn't provide a unit tests, this must be fine for now.
* | Bug 1020 - First MSAA FBO frame on a mac osx nvidia card not antialiasedSven Gothel2014-08-311-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSX/Nvidia's FBO needs to be cleared before blitting, otherwise first MSAA frame lacks antialiasing. GLFBODrawableImpl.initialize(..) can clear GL.GL_COLOR_BUFFER_BIT and GL.GL_DEPTH_BUFFER_BIT, if used. FBObject cannot clear the buffer(s) due to it's low-level API, i.e. it cannot know when the first bind occurs _after_ user completed FBO setup (attaching buffers). Hence plain FBObject usage required manual injection of glClear(..) after setup as demonstrated in GLJPanel. We may need to elaborate in this case, i.e. add an FBObject API entry like 'fbo.postInitNotify()'.
* | Bug 1054: Revert dfb9ed47ac6d8e85f6ae5fe166e7a6e28ca8ff83: Cannot change ↵Sven Gothel2014-08-302-35/+35
| | | | | | | | protected field name w/o breaking backward compatibility
* | Bug 1055 - Access and query shared master GLContext in a deterministic ↵Sven Gothel2014-08-302-73/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fashion ; Don't use arbitrary shared context as 'master'. GLContext* passes the shared-master to GLContextShareSet, which only creates a sets of shared contexts without differentiating the master context. GLContext*'s shared-slave attempts to lock the realized shared-master's surface at creation. Currently only an arbitrary shared context is selected due to the missing 'master' identity. The arbitrary shared context's surface is locked and its shared context handle used to create the slave context. Lacking of using the user given shared-master can lead to deadlock situations - and locking a 'wrong' surface. +++ The patch: - Allows query the user given shared-master! - Use the user given shared-master for locking and it's context handle for the slave's creation. - The shared-context mapping maps each shared-master to a shared-slave within one shared-context-set, allowing deterministic and individual shared-master queries.
* | Bug 1054: GLContext: makeCurrent() needs a null-check of [mutable] ↵Sven Gothel2014-08-302-99/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drawable; Review null checks and synchronization/locking. 'drawable' field of GLContextImpl is mutable via setGLDrawable(..), which requires high-level locking as documented. The required high-level locking allows us to _not_ add special synchronization to this field (and drawableRead). A simple null-check in makeCurrent() shall be sufficient, plus ensuring mentioned high-level locking is applied. GLContextImpl 'drawable' and 'drawableRead' synchronization: - commit ad79bd072b600a3f2416cc6f0c61e2925000069d check of null drawable is sufficient - Add GLAutoDrawable upstream-lock locking to: - AWT GLCanvas setupPrint/releasePrint - AWT GLJPanel (was missing) Misc: - validate shared-context native-surface locking, throw exception if not successful - pixelDataEvaluated does not need to be synchronized, since it's being called while context is current, locking - GLDrawableHelper.recreateGLDrawable(..): Remove redundant glFinish() call
* | Bug 1054: Cleanup GLContext: 'lock' -> 'contextLock'Sven Gothel2014-08-292-35/+35
| |
* | Bug 1054: Cleanup GLContext 'lock' and 'drawable' usage, perform drawable ↵Sven Gothel2014-08-291-65/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | null check in constructor. This patch merely cleans up 'lock' and 'drawable' usage, while fixing: - constructor: Add drawable null check -> IllegalArgumentException - setGLReadDrawable: Proper precondition checks - setGLDrawable: Proper precondition checks Affected methods of mutable drawable for which we have to consider locking: - setGLReadDrawable - setGLDrawable - release - destroy - makeCurrent
* | graph/font: Use 'pixelSize' var-name, remove redundanciesSven Gothel2014-08-282-43/+37
| |
* | GLStateTracker: Avoid private access wrapper, reuse fetched pixelStateMapSven Gothel2014-08-281-6/+6
| |
* | Bug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for ↵Sven Gothel2014-08-072-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-063-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 1028 - AMD Windows driver thread hinders JVM process to exit/end, caused ↵Sven Gothel2014-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by _not_ destroying the SharedResource context SharedResourceRunner stop() method is invoked by JMV shutdown hook and GLProfile/GLDrawableFactory.shutdown*(). It shall issue SharedResource.releaseSharedResource() for all implementations, e.g. X11/GLX and Windows/WGL. +++ Root cause is a GL driver thread keeping the process alive. +++ On X11/GLX we destroy the shared context and the shared drawable. On Windows/WGL we only destroy the shared drawable, knowing that destroying the shared context caused a driver bug in the past. Will enable the shared context destruction, which is the proper way. +++ Commiting this patch to see whether our jenkins builds won't crash due to previous experienced issues.
* | Bug 1036: Renamed property to switch off NVidia Windows workaround ↵Sven Gothel2014-08-041-2/+8
| | | | | | | | 'jogl.windows.cpu_affinity_mode' (dropping '.debug')
* | Fix NPE regression of commit ba1ffe66697c3175b423cb7ab9b686d73959708dSven Gothel2014-07-311-9/+8
| |
* | Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while ↵Sven Gothel2014-07-313-27/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | GLDrawable: Expose getRequestedGLCapabilities() (Include to public API)Sven Gothel2014-07-312-1/+8
| | | | | | | | | | | | | | | | | | | | 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.
* | Bug 1038 - Fix: Allow skipping detection of certain GLProfiles: Skip ↵Sven Gothel2014-07-303-14/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* | Revert "GLContext: Don't map compatibility profiles to core profile if the ↵Sven Gothel2014-07-301-0/+12
| | | | | | | | | | | | latter are not available (restrict profile aliasing) ; GLProfile does this - Simplification." This reverts commit c8b99d197769eaec53c2def562c0ef3fc0e6a9d2.
* | Bug 1038 - Allow skipping detection of certain GLProfiles: Skip ↵Sven Gothel2014-07-303-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* | GLContext: Don't map compatibility profiles to core profile if the latter ↵Sven Gothel2014-07-301-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are not available (restrict profile aliasing) ; GLProfile does this - Simplification. GLContext shall not map compatibility profiles to core profile if the latter is are not available (restrict profile aliasing). If a user requests a straight GL3 core profile, don't answer with a compatibility profile, e.g. GL4bc. Hence this patch exposes the true GL profile situation more honestly the the user! User can already query profile mappings via GLProfile, i.e. - GL2GL3, - GL4ES3, or via - getMaximum - getMaxFixedFunc - getMaxProgrammable - getMaxProgrammableCore This also fixes an issue when a user requests 'getMaxProgrammableCore' but would receive a GL4bc profile.
* | Bug 1038 - Allow skipping detection of certain GLProfiles: Skip native core ↵Sven Gothel2014-07-292-18/+20
| | | | | | | | | | | | profiles via property 'jogl.disable.openglcore' Also moved all GL profile properties to GLProfile class and made them public for better documentation.
* | FixedFuncHook: Use downstream gl.getGLProfile().getImpl() for custom GL2ES1 ↵Sven Gothel2014-07-291-2/+2
| | | | | | | | impl. profile, reflecting true implementing profile.
* | BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, ↵Sven Gothel2014-07-291-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | WindowsWGLDrawableFactory: Fix html docSven Gothel2014-07-291-0/+2
| |
* | Bug 1036: NVidia Windows Driver 'Threaded optimization' workaround. [3/3]Sven Gothel2014-07-291-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 1037 - FBObject/GLFBODrawable: Do not assume using a TextureAttachment ↵Sven Gothel2014-07-284-27/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 1029 - Memory leak in GLDrawableHelper: 'perThreadInitAction' shall use ↵Sven Gothel2014-07-281-6/+21
| | | | | | | | | | | | | | a WeakReference Static ThreadLocal 'perThreadInitAction' leaks memory if using a hard reference, utilizing a WeakReference allows the passed 'initAction' owner to be garbage collected.
* | Bug 1035 - Allow Gamma [Brightness, Contrast] settings to be performed on ↵Sven Gothel2014-07-274-116/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-275-74/+172
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-33/+26
| | | | Adapt to GlueGen commit f5c48efcf546ba4e08e197ccced6df83b57e1755
* Refine commit ec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25: Call ↵Sven Gothel2014-07-101-8/+1
| | | | 'areAllGLEventListenerInitialized()' directly from GLAutoDrawable
* Bug 1031: Remove Deprecated Classes and Methods (JOGL)Sven Gothel2014-07-108-299/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-093-66/+153
|
* 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-083-3/+3
|
* Findbugs: Use inner static class where possibleSven Gothel2014-07-0811-66/+67
|
* Findbugs: Misc minor issues (see below)Sven Gothel2014-07-086-43/+38
| | | | | | | - 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-081-1/+1
|
* Findbugs: Remove dead-code / unused [temp] storage and it's assignmentSven Gothel2014-07-0814-103/+119
|