aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 718: Windows BITMAP Offscreen Fails w/ GLCaps other than simple RGB888 - ↵Sven Gothel2013-04-173-24/+58
| | | | | | | | | | | | | Filter invalid PFD configs - Filter invalid PFD configs - WindowsBitmapWGLDrawable: Clip chosenCaps to RGBA888[0|8] - WindowsBitmapWGLDrawable: Only use BITMAPINFOHEADER.BiBitCount=24 - WindowsWGLGraphicsConfiguration: Only allow GDI BITMAP PFD's w/ RGB888 w/ alpha <= red, others may fail - WindowsWGLGraphicsConfigurationFactory.getAvailableGLCapabilities() - Fetch ARB caps w/o BITMAP - Concat GDI [BITMAP] caps
* *Capabilities: Cleanup string ctor; GLGraphicsConfigurationUtil: Clean ↵Sven Gothel2013-04-172-11/+80
| | | | getExclusiveWinAttributeBits(..); WGLGLCapabilities: Add PFD2String(..)
* Fix Bug 705 - Set Quirk DontCloseX11Display also if using X11 and X11Util ↵Sven Gothel2013-04-161-14/+26
| | | | has set 'markAllDisplaysUnclosable' (Down -> Upstream)
* Fix Bug 705 - Cleanup & Generalize Commit ↵Sven Gothel2013-04-164-60/+96
| | | | | | | | | | | | | | | | | | | | | | | 5b47372590ec715647ebbd75d70c41ec7a64485a ; Close X11 Display in isDeviceSupported() - Moved GL vendor version parsing to GLVersionNumber - Moved X11Util.markAllDisplaysUnclosable() trigger into SharedResource creation of - X11GLXDrawableFactory - EGLDrawableFactory - GLProfile is back to pre 5b47372590ec715647ebbd75d70c41ec7a64485a, i.e. contains no quirk artifact (clean) - Close X11 Display in X11GLXDrawableFactory.isDeviceSupported() Regression of 9a4fcc7ea4ec61e4ceed791acced734ac04ea270 - TODO: Remove X11Util markAllDisplaysUnclosable detection code ? Notes to Martin: - Use TAB == 4 SPACES - No author names into source code, git commit log is enough. - No need to tag your edits, the diff is enough.
* Fix Bug 705 - Make Mesa X11 driver < 8.0 use new Quirk ↵Martin Hegedus2013-04-151-0/+32
| | | | DontCloseX11DisplayConnection
* Fix Bug 692: Add tracking of VERTEX_ARRAY_BINDING, and enable allowing a ↵Sven Gothel2013-04-142-0/+6
| | | | | | | | | | | bound non default VAO to pass VBO enabled test, even if VBO is disabled. VAO is available if: GL >= 3.0 or is having GL_ARB_vertex_array_object extension. checkBufferObject(..) checks whether VERTEX_ARRAY_BINDING has a non default VAO bound in case no VBO is being bound and VAO is allowed. glBindVertexArray(int) is being tracked, i.e. on state VERTEX_ARRAY_BINDING
* FBObject.init() uses safe 1x1 size like reset(..) to behave equal; ↵Sven Gothel2013-04-121-17/+16
| | | | GLFBODrawableImpl.contextMadeCurrent(ctx, true): Throw exception if !initialized
* GLContextImpl: destroy(): Fix null drawable check; makeCurrentWithinLock(): ↵Sven Gothel2013-04-122-24/+58
| | | | | | | | | | | | | | | | | | | | | | | | Add drawable size validation before attempt to create context; MacOSXCGLContext: Explicit exception for Null AttachGLLayerCmd. GLContextImpl: - destroy(): - Fix null drawable check Only if the GLContext isCreated(), we require a drawable to be set. - Proper name of associateDrawable Exception - makeCurrentWithinLock(): - Add drawable size validation before attempt to create context. - 'makeCurrent()' shall never be called w/o proper sized drawable, i.e. > 0x0. - returns CONTEXT_NOT_CURRENT, if drawable size is <= 0x0 MacOSXCGLContext: - Explicit exception for Null AttachGLLayerCmd. In case context creation has failed via makeCurrent(), AttachGLLayerCmd may never been issued and hence maybe NULL. Catch this case and send a meaningful exception, which is catched and fwd in GLContext.destroy().
* GLContextImpl.destroy(): Fail fast in case of invalid dawable [null, ↵Sven Gothel2013-04-101-14/+21
| | | | !realized] and makeCurrent() failure.
* GLDrawable: Refine API doc; GLDrawableImpl: Balance ↵Sven Gothel2013-04-104-28/+64
| | | | | | | | | | | | | | | | | | createHandle()/destroyHandle(); Handle LOCK_SURFACE_CHANGED in lockSurface() ; GLContextImpl.makeCurrent(): Fix drawable handle validation. GLDrawable: Refine API doc (realized/handle) - Lifecycle of the drawable handle was not clear - Ephasizing handle's dependency on NativeSurface's lock state and drawable's realization GLDrawableImpl: Balance createHandle()/destroyHandle() - updateHandle() -> createHandle() - ensure both are balance, see below GLDrawableImpl: Handle LOCK_SURFACE_CHANGED in GLDrawableImpl's lockSurface() - call destroyHandle() and createHandle() GLContextImpl.makeCurrent(): Validate drawable handle if realized only. - it is valid to have an invalid drawable handle if not realized (see above)
* Debug Messages: Unify getThreadName() usage and 'Catched Exception' messagesSven Gothel2013-04-1012-44/+40
|
* Bug 713: Handle broken EGL setup - Catch all Exception types, not only ↵Sven Gothel2013-04-053-6/+3
| | | | | | | | | | JogampRuntimeException at *DrawableFactory* instantiation trial In case EGL is not completly installed, EGLDisplayUtil.eglGetDisplayAndInitialize(..) will throw a GLExeception which was not catched in GLDrawableFactory. The latter only catched JogampRuntimeException caused by ReflectionUtil due to n/a classes, but the actual initialization code is capable to throw others.
* Fix Bug 671: Add JPEG Decoder w/o AWT DependenciesSven Gothel2013-04-011-0/+1505
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original JavaScript code from <https://github.com/notmasteryet/jpgjs/blob/master/jpg.js>, author 'notmasteryet' <async.processingjs at yahoo.com>. Ported to Java. Enhancements: * InputStream instead of memory buffer * User provided memory handler * Fixed JPEG Component ID/Index mapping * Color space conversion (YCCK, CMYK -> RGB) * More error tolerant +++ Features: JOGL AWT RGB ok ok YCCK ok Exception CMYK ok Exception YUV Store ok n/a Need Y-Flip no yes +++ Benchmark: TestJPEGJoglAWTBenchmarkNewtAWT JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l AWT..... Loops 100, dt 2144 ms, 21.44 ms/l File: jogl/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/j1-baseline.jpg Machine: GNU/Linux PC (AMD 8 core), JavaSE 6 (1.6.0_38) .++++ UITestCase.setUp: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark libEGL warning: DRI2: failed to authenticate 0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS RGB, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]] 0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166] JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l 0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS YCbCr, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]] 0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166] JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l 0: TextureData[261x202, y-flip true, internFormat 0x1907, pixelFormat 0x80e0, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 261, buffer java.nio.HeapByteBuffer[pos=0 lim=158166 cap=158166] AWT..... Loops 100, dt 2144 ms, 21.44 ms/l ++++ UITestCase.tearDown: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
* GLStateKeeper: Add clearPreservedGLState()Sven Gothel2013-03-281-2/+7
|
* Complete 9a4fcc7ea4ec61e4ceed791acced734ac04ea270: ↵Sven Gothel2013-03-271-3/+0
| | | | SharedResourceRunner.Impl.createSharedResource(..): isGLXAvailableOnServer(..) call redundant since checked upfront at isDeviceSupported(..)
* SharedRessourceRunner: Add isDeviceSupported(..) query before spawn off ↵Sven Gothel2013-03-273-2/+31
| | | | thread, allowing a more gracefull detection of n/a GLX on X11
* Add GLStateKeeper handling GLEventListenerState preservation and ↵Sven Gothel2013-03-221-11/+37
| | | | | | | | | | | | | | | restauration for GLAutoDrawable - New GLStateKeeper interface, package com.jogamp.opengl Implemented by: - GLAutoDrawableBase Currently supported by: - NEWT GLWindow - GLEventListenerState package move: com.jogamp.opengl.util -> com.jogamp.opengl
* MacOSXCGLContext: NPE in DEBUG mode while releaseNSOpenGLLayer on ↵Sven Gothel2013-03-201-2/+2
| | | | main-thread, drawable maybe null already
* MacOSXCGLContext: Remove Debug outputSven Gothel2013-03-191-1/+0
|
* OSX/CALayer: OSX/CALayer Threading Part3 - Run CALayer ops in a streaming ↵Sven Gothel2013-03-193-136/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | design on main-thread w/o [infinitive] blocking History: Part1 commit 896e8b021b39e9415040a57a1d540d7d24b02db1 (Run CALayer Ops on current thread to avoid blocking) Part2 commit 28c6472335b924080d638b33a28f8f4eedb459b1 (Run CALayer Ops on main-thread w/o blocking) Dependency: GlueGen commit 4becdfa125b07ff969d6540e1112735b53cd15eb (Fix RecursiveLockImpl* Timeout corner case) Part2 misses essential locking of the OpenGL context (and it's surface upfront) while creating the NSOpenGLLayer instance. The latter instantiates a OpenGL context shared w/ JOGL's, hence it cannot be locked. Encapsulating NSOpenGLLayer creation/attachment and it's detachment/release in sub-classes AttachNSOpenGLLayer and DetachNSOpenGLLayer, where instances will be streamed on main-thread. Both tasks are triggered at associateDrawable(boolean bound). The mentioned GL context locking requires disturbs the 'streaming' design considerably in AttachNSOpenGLLayer. It is solved by attempt to acquire the recursive lock of the surface and the context via 'tryLock(maxwait)' w/ screen-vSync-period/2. If the locks could not be acquired completly, the AttachNSOpenGLLayer instance will be re-queued to the main-thread for later execution. Before DetachNSOpenGLLayer is being streamed, it is validated whether AttachNSOpenGLLayer did run. A recursive situation does happen w/ resizing an offscreen pbuffer drawable! Hence extra care is being taken.
* Remodel OSX/CALayer Threading (commit ↵Sven Gothel2013-03-153-59/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 896e8b021b39e9415040a57a1d540d7d24b02db1): Run on main-thread w/o blocking ; Misc Changes Commit 896e8b021b39e9415040a57a1d540d7d24b02db1 moved all native CALayer calls to the current thread to avoid deadlocks. Even though this seemed to be fine at least resource GC (release/dealloc calls) were issued very late in time, probably due to multithreading synchronization of JAWT and/or OSX API. Example: Our 'TestAddRemove01GLCanvasSwingAWT' test didn't freed CALayer resources incl. GL ctx when destroying the objects (AWT Frame, GLCanvas, ..), leading to resource starvation .. eventually. Remedy is a compromise of behavior before commit 896e8b021b39e9415040a57a1d540d7d24b02db1 and that commit, i.e. to run CALayer lifecycle methods on main-thread, but do not block! The careful part within MacOSXCGLContext.associateDrawable(..) performs the following block on main-thread: - lock the context - create NSOpenGLLayer (incl. it's own shared GL context and the DisplayLink) - attach NSOpenGLLayer to root CALayer - unlock the context Due to the GL ctx locking, this async offthread operation is safe within our course of operations. Details: - NSOpenGLContext - Context and CVDisplayLink creation at init - Call [ctx update] if texture/frame size changed - 'waitUntilRenderSignal' uses default TO value if given TO is 0 to avoid deadlocks +++ Misc Changes: - Fix object type detection: isMemberOfClass -> isKindOfClass - OSXUtil_isNSView0 OSXUtil_isNSWindow0, CGL_isNSOpenGLPixelBuffer - MacOSXCGLDrawable/MacOSXPbufferCGLDrawable: remove getNSViewHandle() method. MacOSXCGLContext uses common code to detect nature of the drawable handle. - MacOSXCGLContext/CALayer: Use safe screenVSyncTimeout values, never 0 to avoid deadlock! - JAWTWindow.invalidate: Call detachSurfaceLayer() if not done yet
* Fix NEWT WindowImpl reparent-recreate w/ GLEventListenerState: Bug ↵Sven Gothel2013-03-141-1/+4
| | | | | | | | | introduced w/ commit e2506d7663b752f00f0a98f793ebad52e65bd1e3 In case a reparent action takes place w/ recreate, only preserve the GLEventListenerState if the window is valid and will become visible again (wasVisible). Also add proper DEBUG log prefix to GLEventListenerState.
* OSX/CALayer: Revise CALayer 'RunOnMainThread' utilization, avoiding deadlocksSven Gothel2013-03-141-18/+12
| | | | | | | | | | | | | | | | | | | | | | RunOnMainThread(waitUntilDone:=true,..) can deadlock the main-thread if called from AWT-EDT, since the main-thread may call back to AWT-EDT while injecting a new main-thread task. This patch revises all RunOnMainThread CALayer usage, resulting in only one required left: - OSXUtil.AddCASublayer() w/ waitUntilDone:=false Hence the CALayer code has no more potential to deadlock main-thread/AWT-EDT. OSXUtil.AddCASublayer() must be performed on main-thread, otherwise the CALayer attachment will fail - no visible rendering result. +++ Note: A good trigger to test this deadlock is to magnify/zoom the OSX desktop (click background + ctrl-mouse_wheel) before running some unit tests. TestGLCanvasAWTActionDeadlock01AWT and TestAddRemove02GLWindowNewtCanvasAWT also have the potential to trigger the mentioned deadlock.
* GLEventListenerState: Moved to public package 'com.jogamp.opengl.util'Sven Gothel2013-03-132-364/+1
|
* Minor Changes: EGLDisplayUtil: Add stack trace in DEBUG mode for opened ↵Sven Gothel2013-03-131-16/+60
| | | | DPYs; JAWTWindow: Add JAWT info in toString()
* Bug 665: Allow re-association of GLContext/GLEventListener to a GLDrawable ↵Sven Gothel2013-03-131-0/+56
| | | | | | | | | | | | | | | | | | | | (Part 5) - GLAutoDrawableBase: - Add 'setPreserveGLStateAtDestroy(..)' to preserve the GLEventListenerState at destroy() operation, and impl. details pullGLEventListenerState()/pushGLEventListenerState(). pullGLEventListenerState() is called automatic at destroyImplInLock(), where pushGLEventListenerState() has to be called after drawable realization instead of context creation. - Note/TODO: Method will become public in GLAutoDrawable in general! - NEWT/GLWindow: - Use GLEventListenerState preservation for reparenting case w/ destruction, i.e. keep GLContext/GLEventListener alive while reparenting in recreation mode. Scenario: NewtCanvasAWT Child <-> Top on OSX w/ CALayer
* Bug 665: Allow re-association of GLContext/GLEventListener to a GLDrawable ↵Sven Gothel2013-03-1310-192/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Part 4) Note: - GLEventListenerState preservs the GLAutoDrawable state, i.e. GLContext, all GLEventListener and the GLAnimatorControl association. - GLEventListenerState may be utilized to move the state from a dying GLAutoDrawable, to be moved to a new created GLAutoDrawable at a later time. - GLEventListenerState will be made public soon. +++ Exessive unit tests cover the new feature, tested manually on GNU/Linux/X11 and OSX(Java6/Java7). +++ - GLAutoDrawable - Change 'setContext(..)' to allow the destruction of the unbound old context: 'setContext(GLContext newCtx)' -> 'setContext(GLContext newCtx, boolean destroyPrevCtx)' - Implementations: Properly implement 'setRealized(..)' incl. obeying threading constraints if exists. Method is being utilized at least for GLEventListenerState.moveTo(..) to unrealize and realize the drawable resources. +++ Fix propagation of GLContext/GLDrawable association change (Bottom -> Top): GLDrawableImpl.associateContext GLContextImpl.associateDrawable GLContextImpl.makeCurrent GLContextImpl.destroy GLContext.setGLDrawable ... GLDrawableHelper.switchContext GLAutoDrawble.setContext associateDrawable(..)/associateContext(..) unifies and hence: - GLContextImpl.contextRealized() (removed) - GLDrawableImpl.contextRealized() (removed) - GLDrawableImpl.associateContext(..) (merged) - MacOSXCGLContext.drawableChangedNotify(..) (removed) +++ - EGLUpstreamSurfaceHook.evalUpstreamSurface() validates the surface's device for reusage, which is valid in case of GLEventListenerState.moveTo(..) - MacOSXCGLContext.NSOpenGLImpl: pixelFormat replaces NSOpenGLLayerPfmt and has simplified lifecycle [create..destroy], while native NSOpenGLLayer code only holds the reference until released.
* MemoryObject: Use GlueGen's new HashUtilSven Gothel2013-03-131-44/+6
| | | | GlueGen commit 1a4514accc8f61ab7ff5fe8c82d22a5ef356c865
* *External*Context Impl: Remove unused 'lastContext' field, incl. their ↵Sven Gothel2013-03-134-85/+2
| | | | | | | makeCurrent() and release() override. Semantics of 'lastContext' are plain wrong, since release() override does claim the previous 'lastContext' is current at the end - however, it wasn't technically made current.
* Fix Bug 695: WGLExt.wglChoosePixelFormatARB causes buffer underflow due to a ↵Sven Gothel2013-02-282-2/+2
| | | | | | | | | | | | higher reported number of configs than buffer size "I encountered a case on an NVidia Quadro 3500 fx where the call to WGLExt.wglChoosePixelFormatARB in WindowsWGLGraphicsConfiguration (currently line 355) returns 264 in numFormatsTmp despite 256 being passed in for the maximum number of formats. This results in a buffer underflow on line 368 since pformatsTmp only has 256 values and it's trying to copy 264 values." Fixed in WindowsWGLGraphicsConfiguration and WindowsPbufferWGLDrawable.
* Adapt to GlueGen's relocation of AWTEDTExecutor - GlueGen commit ↵Sven Gothel2013-02-281-1/+2
| | | | 99a50b38f5650fedca0f207e03706ffa9492e50c
* Bug 548 and Bug 679: Add 'glFlush()' requirement (OSX < 10.7.3 && NVIDIA ↵Sven Gothel2013-02-212-15/+44
| | | | GPU) to GLRendererQuirks and perform only if exists.
* Relax GLContextImpl.setGLFunctionAvailability(..)'s Version Matching if ↵Sven Gothel2013-02-211-2/+2
| | | | | | | | testing major < 3 versions. (Bug 679) On OSX, we 'only' support the ctx ARB creation and hence have no !ARM fallback. If querying a version [2.0 .. 3.0] for GL2, it is acceptable if a valid OpenGL version is lower, e.g. 1.4.
* Fix GLVersionNumber (Bug 679): Don't use a subsequent version number if not ↵Sven Gothel2013-02-211-3/+8
| | | | valid!
* Fix NPE of Bug 679: The ctx was released w/o fully initialized (no proper ↵Sven Gothel2013-02-202-2/+4
| | | | ARB ctx of expected version ?)
* OSX/Java7/CALayer + JAWT: Partially Fix AWT/NEWT CALayer 'out of sight' bug, ↵Sven Gothel2013-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | where our CALayer is moved out of the visible area - same erroneous behavior for GLCanvas and NewtCanvasAWT - sized-frame: Set framesize and validate() it - sized-component: Set component preferred size and call frame.pack() - added workaround 'OffscreenLayerSurface.layoutSurfaceLayer()' to fix CALayer size, which snaps for: - OK initial size before setVisible: sized-frame and sized-component - OK resize w/ sized-frame - OK manual frame resize - Invisible: w/ sized-component after setVisible() ++ - CALayer-Sublayer (GL) has additional retain/release when added/removed to be on safe side.
* Fix Bug 644: AWT GLCanvas and GLJPanel ignored their visibility stateSven Gothel2013-02-161-0/+1
| | | | | If !visible, GLCanvas and GLJPanel's paint* and display method shall not render as the other GLAutoDrawable impl. do (GLWindow, SWT GLCanvas).
* X11/WGL: Better Exception Message for failed ARB context creation if profile ↵Sven Gothel2013-02-162-2/+2
| | | | > GL2 (OpenGL >= 3.0.1) was requested.
* Fix Bug 691 (part-3): NSOpenGLLayer::openGLContextForPixelFormat(..) on ↵Sven Gothel2013-02-161-6/+25
| | | | | | | | | | | | | | | | | | | | main-thread deadlock'ed due to locked shared context NSOpenGLLayer::openGLContextForPixelFormat(..) is performed on main-thread at 1st NSOpenGLLayer display method. This happened irregulary, i.e. sometimes (T0) right after NSOpenGLLayer creation and attachSurfaceLayer()/AddCASublayer(..), sometimes later (T1). NSOpenGLLayer::openGLContextForPixelFormat(..) uses the passed shared user context. The shared user context is locked at NSOpenGLLayer's creation (T0) and if performed at this early time the call deadlocks due to pthread_mutex wait for the shared user context. This fix performs NSOpenGLLayer creation and layer attachment while the shared user context is kept unlocked and enforces NSOpenGLLayer display and hence NSOpenGLLayer::openGLContextForPixelFormat(..). Added CGL.setNSOpenGLLayerEnabled(..) to enable/disable NSOpenGLLayer - currently not used. - Passed AddRemove tests for GLCanvas/Swing and GLWindow/NewtCanvasAWT w/ 100 loops on Java6 and Java7 on OSX. - Passed Instruments Leaks test w/ 10 loops on Java6 and Java7
* Fix Bug 691 (part-2): Extra '[subLayer release]' is wrong, since ↵Sven Gothel2013-02-151-4/+1
| | | | | | | | | | | | | | | | | | | | 'CGL.releaseNSOpenGLLayer' triggers release - but very late w/ AWT usage. OSXUtil_RemoveCASublayer0's added '[subLayer release]' in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161 is wrong, since 'CGL.releaseNSOpenGLLayer' actually does trigger it's release. This was not seen w/ AWT tests, since it happens very later. A NewtCanvasAWT test disclosed this error -> removed that extra release call. The culprit for the late release w/ AWT usage was CGL.createNSOpenGLLayer's call in the current thread. Moving it to the Main-Thread fixed the problem. All CALayer lifecycle calls are issued on the Main-Thread now. NSOpenGLLayer's CVDisplayLink OpenGL fitting via 'CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext' is now performed at it's context creation in 'NSOpenGLLayer::openGLContextForPixelFormat'. The 'extra' release of the NSOpenGLLayer's NSOpenGLContext as introduced in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161 is still valid.
* Fix OSX CALayer Bug 690 and Bug 691: Occasional Freeze on CVDisplayLinkStop; ↵Sven Gothel2013-02-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layers and native GL-Context are _not_ Released ; Java Side wait for Main-Thread - Fix Bug 690: Occasional Freeze on CVDisplayLinkStop - NSOpenGLLayer.disableAnimation() shall not claim the renderLock mutex, since the CVDisplayLink callback could be waiting for the lock. This waiting callback could freeze the call to CVDisplayLinkStop. - Fix Bug 691: Layers and native GL-Context are _not_ Released - Following proper release cycle: Context unrealized: - JAWTWindow.detachSurfaceLayer() -> OSXUtil.RemoveCASublayer(..) - CGL.releaseNSOpenGLLayer(..) JAWTWindow.destroy() - MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..) - OSXUtil.DestroyCALayer(..) - 'Magic' CALayer release calls (w/o manual retain beforehand) at: - OSXUtil.RemoveCASublayer(..): [subLayer release] - MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..): [rootLayer release] - OSXUtil.DestroyCALayer(..): [rootLayer release] - 'Magic' NSOpenGLLayer's NSOpenGLContext dealloc: - [NSOpenGLContext clearDrawable] - CGLDestroyContext( [NSOpenGLContext CGLContextObj] ) - Java Side wait for Main-Thread - Waiting for the delegated Main-Thread on the Java side eases debugging and won't block the Main-Thread in native code. - Utilizing this for all CALayer calls Test case: TestGLCanvasAddRemove01SwingAWT
* Java2D OGLPipeline(GLJPanel+Threading): More fine grained control about OGL ↵Sven Gothel2013-02-122-116/+144
| | | | | | | | threading and resource usage - Still excluse OSX - Respect sun.java2d.opengl property - [Prepare] Allowing OGLPipeline thread usage w/o it's OGL resource usage
* GLContext: *TRACE_SWITCH spacingSven Gothel2013-02-112-13/+13
|
* Bug 665 (part 3) - Allow dis-association of GLContext's GLDrawable .. - Add ↵Sven Gothel2013-01-272-27/+116
| | | | | | | | | | | | | | | | | | | | | | | | | EGL/ES2 tests, attempt to fix wrapped EGL case - Bug 665 (part 2) was commit 7fd5f76e1eb4bbf93fe9b1171744bd755d8f96e4 - Add EGL/ES2 tests in - TestGLContextDrawableSwitch01NEWT - TestGLContextDrawableSwitch11NEWT - Attempt to fix wrapped EGL case (incomplete) - Using EGL/ES w/ non native EGL device/surface, but natively wrapped instances (most of the cases), a 'complicated' delegation of Native-Upstream -> EGL-Proxy -> EGL-Instance is being used heavily relying on the objects lifecycle. GLEventListenerState tries to roll back the realized state and even sets the upstream device handle, but this doesn't seem to be sufficient on X11. Discussion: It might turn out that we only can implement the survival of GLContext and it's display device reliable w/ EGL within the GLAutoDrawable implementation, which can hold the previous not destructed instances.
* GLDrawableHelper.invoke: If drawable is !realized -> deferred executionSven Gothel2013-01-271-2/+2
|
* Refine GL[Auto]Drawable 'realized' state in API doc, and relax it's realized ↵Sven Gothel2013-01-262-7/+13
| | | | | | | | | | | | | requirement in GL[Offscreen]AutoDrawableDelegate* Compatible w/ 'before'. TODO: Contemplate about GLDrawableFactory.createOffscreenAutoDrawable(..) whether it: - should better return an unrealized [auto]drawable - or adding another API method for such case Goal: Allow passing vector of [device/context/..] for use cases such as re-using an onscreen destructed surface and on-/offscreen hopping.
* WGLContext: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-261-1/+5
|
* ProxySurface: Add 'NativeSurface getUpstreamSurface()' ; ProxySurfaceImpl: ↵Sven Gothel2013-01-261-0/+1
| | | | | | | | | | | | | | Don't cache 'displayHandle' - ProxySurface: Add 'NativeSurface getUpstreamSurface()' allowing querying direct access of a backing surface representing this instance. - Use case: EGLWrappedSurface - Default impl. returns null - ProxySurfaceImpl: Don't cache 'displayHandle' - getDisplayHandle() is 'final', no more 'shortcut' code allowed due to re-association incl. display handle. - See commit b738983638703bb721ee4c9820c8ef43e2252e73
* [EGL/X11]Context: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-262-10/+20
|
* FBObject/GLFBODrawableImpl: Silence stderr if not in DEBUG mode relying on ↵Sven Gothel2013-01-261-16/+19
| | | | | | | | | | | application handling verbosity and debug output The following cases were dumping states on stderr: - FBOObject.isStatusValid() if false -> Only dumps if DEBUG - GLFBODrawableImpl.reset() if fboResetQuirk becomes true and 1st time in ClassLoader -> Only dumps if DEBUG