aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1078: Add Fallback in AWTPrintLifecycle.setupPrint(): Use Onscreen GLAD ↵Sven Gothel2014-09-304-13/+50
| | | | | | | | | | | | | | | | | | | 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.
* Refine Graph/Font InputStream Capabilities (commit ↵Sven Gothel2014-09-306-164/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 628509b39ea7c16210315d191860511d6be4aa69) FontFactory Remove: - Font get(final URLConnection conn) - Font get(final InputStream stream) FontFactory Add: - [1] Font get(final InputStream stream, final int streamLen, final boolean closeStream) - Direct usage of font InputStream w/ determined length, may instantiate BufferedInputStream in case given stream doesn't support mark/reset! - [2] Font get(final InputStream stream, final boolean closeStream) - Copy font InputStream w/o determined length, resulting in BufferedInputStream supporting mark/reset! Security Related: - Only perform priviledged code on determine InputStream, _not_ when parsing the font stream itself! - Hence PrivilegedAction only happens in FontFactory's InputStream preparation. Misc: - Use Uri class
* Merge remote-tracking branch 'picoworm/master'Sven Gothel2014-09-244-4/+44
|\
| * Added possibility to load font using InputStream parameterRoman2014-07-244-4/+44
| |
* | Fix future compatibility issues (analog to b22x commit ↵Sven Gothel2014-09-243-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 GLContextImpl.setRendererQuirks(..) CTX_IMPL_ACCEL_SOFT profile stateSven Gothel2014-09-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - GLContextImpl.setRendererQuirks(..) in called in GLContextImpl.setGLFunctionAvailability(..) - GLContextImpl.setRendererQuirks(..) was called before fixing CTX_IMPL_ACCEL_SOFT via isCurrentContextHardwareRasterizer(). The latter set CTX_IMPL_ACCEL_SOFT based on known software renderer string within GL_RENDERER. This lead to incorrect hwAccel assumption and hence wrong setting of GLRendererQuirks: - NoDoubleBufferedPBuffer (was selected even w/ later CTX_IMPL_ACCEL_SOFT) - BuggyColorRenderbuffer (was never selected) - Fix performs GLContextImpl.setRendererQuirks(..) _after_ fixing CTX_IMPL_ACCEL_SOFT via isCurrentContextHardwareRasterizer().
* | Fix synchronization issues in GLDrawableHelper.flushGLRunnables(), fixes ↵Sven Gothel2014-09-224-66/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-223-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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 GLDrawableHelper.reshape(.., setViewport==true)Sven Gothel2014-09-211-5/+4
| | | | | | | | Only check error if DEBUG || GLContext.DEBUG_GL in GLDrawableHelper.reshape(.., setViewport==true)
* | Bug 1066: Reduce glGetError() in FBObject / GLFBODrawableImplSven Gothel2014-09-212-26/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-203-64/+6
| | | | | | | | | | | | | | | | | | | | - 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-208-72/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-206-182/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-195-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-192-61/+78
| | | | | | | | | | | | 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.
* | FBObject.reset(..): Return true if modified, otherwise falseSven Gothel2014-09-181-13/+32
| |
* | GLJPanel Cleanup: Remove initial FBO reshape; Propagate reshape only if ↵Sven Gothel2014-09-181-17/+17
| | | | | | | | differs from panel-size; Use pre-fetched panel-size.
* | GLJPanel: Allow reconfiguration of offscreen's GLCapabilitiesImmutableSven Gothel2014-09-141-14/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offscreen's GLCapabilitiesImmutable reconfiguration will dispose a realized instance and issues recreation via initializeBackendImpl() immedietly. Implementation performs operation on AWT-EDT. Tests: - TestGearsES2GLJPanelAWT: - Toggle MSAA via 'm' - TestGearsGLJPanelAWT: - Toggle MSAA via 'm' - Toggle Bitmap via 'b'
* | 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-133-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-094-34/+16
| | | | | | | | | | | | | | | | | | | | 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-086-40/+50
| | | | | | | | | | | | | | | | | | - 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 1060 - Add GLProfile.isInitialized(): Returns true if JOGL has been ↵Sven Gothel2014-09-031-0/+15
| | | | | | | | initialized
* | Adding missing '@since 2.2.1' tags to ShaderCode and GLContextSven Gothel2014-09-032-4/+21
| |
* | Bug 1059 _and_ version-compat breackage of commit ↵Sven Gothel2014-09-031-14/+14
| | | | | | | | | | | | | | | | | | | | | | c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983 Commit c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983 changed: - public static final String GL4 = "GL4"; + public static final String GL4 = "GL4".intern(); which is identified by semver as incompatible, due to Bug 1059 (no more inlining of interned string references).
* | Bug 1058 - Fix GLContext.getGLSLVersionString(): Add 'profile' after version ↵Sven Gothel2014-09-021-5/+16
| | | | | | | | for GLSL >= 150 allowing GLSL compatibility profile
* | 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
* | GLProfile: Use String.intern() on static final profile strings ('GL4bc', ↵Sven Gothel2014-09-021-30/+32
| | | | | | | | | | | | | | | | | | 'GL4', ..) consequently using reference comparison. GLProfile already compared profile strings by reference, hence interning those strings to become canonical references was missing! Consequently using reference comparison for all profile strings in GLProfile.
* | Bug 1052 - OpenGL ES 3.0 Mesa 10.1.3 Caught GLException: Not a GL4ES3 ↵Sven Gothel2014-09-021-10/+0
| | | | | | | | | | | | | | | | implementation - Part 2/2 - TestGLProfile01NEWT: Allow ctx.isGLES3Compatible() and hence GL4ES3 on GL3bc and GL3 - GLProfile: Remove GL4ES3 mapping using GL3bc and GL3, only GL4bc, GL4 and GLES3 are allowed in static mapping.
* | 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()
* | Bug 1020 - First MSAA FBO frame on a mac osx nvidia card not antialiasedSven Gothel2014-08-312-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()'.
* | 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()
* | Bug 1054: Revert dfb9ed47ac6d8e85f6ae5fe166e7a6e28ca8ff83: Cannot change ↵Sven Gothel2014-08-303-36/+36
| | | | | | | | protected field name w/o breaking backward compatibility
* | Bug 1055 - Access and query shared master GLContext in a deterministic ↵Sven Gothel2014-08-303-73/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-305-326/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-293-36/+36
| |
* | 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
* | GLSharedContextSetter: Fix API doc and all html references (fix URL and ↵Sven Gothel2014-08-297-11/+43
| | | | | | | | 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-283-47/+76
| |
* | Fix commit b5910f18f0b82a8a1f6f6252dc19971d5e487f39 for toString(): Call ↵Sven Gothel2014-08-282-0/+11
| | | | | | | | super.hashCode(), due to InternalError("hashCode not designed")
* | 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-074-22/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!