aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
* javac - setup encoding to UTF-8Sven Gothel2012-01-232-7/+7
|
* GLDynamicLibraryBundleInfo: Remove 'nativewindow_x11' preload lib ↵Sven Gothel2012-01-233-12/+0
| | | | (implicitly loaded by NativeWindowFactory)
* Minor edit: Suppress USE_WGLVersion_Of_5WGLGDIFuncSet message when default.Sven Gothel2012-01-231-1/+3
|
* Use glFlush() in favor of glFinish() for bug 548 and bug 533 fix - due to ↵Sven Gothel2012-01-231-4/+4
| | | | | | | | | | performance issues. Chris reported a better performance using glFlush() instead of glFinish() while maintaining stability in respect to the NV bug on OSX 10.6.8. Even though this is at release() where we would assume a passed GL sync point (swap buffers) the driver may involve a whole I/O roundtrip .. well.
* Merge pull request #43 from krisher/masterSven Gothel2012-01-191-2/+15
|\ | | | | Fixed SWT threading policy violation when using worker mode for JOGL threading.
| * Fix for use of SWT GLCanvas in headless mode (or with threading in worker ↵Dan Krisher2012-01-111-2/+15
| | | | | | | | mode). See discussion in Bugzilla #484
* | NEWT/OSX CALayer Animation Fix: Use '[layer removeAllAnimations]', '[layer ↵Sven Gothel2012-01-161-6/+0
| | | | | | | | removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition]' doesn't work
* | Minor Edits: Add GL_RENDERER to JoglVersion dump; Fix typo in PMVMatrix.Sven Gothel2012-01-142-4/+6
| |
* | OSX Fix: Catch releaseImpl's glFinish() exception (DebugGL); Make ↵Sven Gothel2012-01-134-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GLContext.release's setCurrent(null) exception prone. Catch releaseImpl's glFinish() exception (DebugGL) glGetError() after glFinish() (eg. w/ debug pipeline) produced unknown error 0x0506 on OS X (10.7.2 NV). Make GLContext.release's setCurrent(null) exception prone Call setCurrent(null) in finalizer block to ensure it's 'released' out of the TLS even when an exception is being thrown. Make MacOSX Shared Resources 'destroy' more error prone (catch exceptions)
* | OSX Fixes: bug 548 (another regression: pixelfmt), ctx creation failure -> ↵Sven Gothel2012-01-135-31/+36
|/ | | | | | | | | | no exception, - bug 548: Another regression: pixelfmt failed for 10.6.7 and/or software OpenGL - enforcing accelerated leads to no pixelformat, - using the NSOpenGLView defaultPixelFormat causes to SIGSEGV - ctx creation failure shall just lead to return null, no immediate exception
* Add 'AWT' in JOGL's SWT GLCanvas test case, since impl. still needs AWT ↵Sven Gothel2012-01-091-0/+4
| | | | threading (-> FIXME)
* minor edits / clarify SWT test descripionSven Gothel2012-01-091-1/+0
|
* SWT GLCanvas: Adapt to latest JOGL changes (init, destroy, ..), Align main() ↵Sven Gothel2012-01-092-60/+63
| | | | | | entry w/ AWT GLCanvas functionality. -
* minor editsSven Gothel2012-01-091-2/+0
|
* SWT GLCanvas: Java 1.5 clean (No @override for interfaces); Add license ↵Sven Gothel2012-01-091-133/+30
| | | | header; Remove dummy comments
* Merge pull request #41 from krisher/masterSven Gothel2012-01-091-0/+652
|\ | | | | More complete implementation of SWT GLCanvas
| * Hopefully fixed use of GLCapabilitiesChooser (I didn't realize that this was ↵Dan Krisher2011-11-141-24/+3
| | | | | | | | already handled via the proxy surface factory). Needs testing
| * [WIP] Added an SWT based GLCanvas implementation nearly identical to the AWT ↵Dan Krisher2011-11-141-0/+673
| | | | | | | | version. Modified build to produce a jogl.swt.jar, and include this in jogl.all.jar. Presently there is no unit test (just a 'main' in the jogamp.opengl.swt.GLCanvas), and this does not support correct selection of GLCapabilities (FIXME and TODO tags in the source state why).
* | Fix bug 548 and bug 533 - OSX [10.6] NVidia driver may require glFinish() ↵Sven Gothel2012-01-091-0/+2
| | | | | | | | before ctx release.
* | Dispatch the '5' GDI/WGL functions and allow using their 'wgl' variants. GDI ↵Sven Gothel2012-01-097-21/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is the default. The following 5 GDI functions have their 'wgl' counterparts which 'shall' being used in case the OpenGL DLL is being loaded dynamically. (So reads the documentation & FAQ). This seems to be required only in case the std. opengl32.dll is not being used. This use case is called GDI/ICD. If using a non std. OpenGL DLL, is called MCD. We dynamically load the OpenGL DLL and fetch the address pointer. Since we generally use the std. opengl32.dll, our use of the GDI callbacks seems to be legal. However, to test using the 'wgl' method WGLUtil is introduced. You can test using the 'wgl' variants by defining the property: 'jogl.windows.useWGLVersionOf5WGLGDIFuncSet'. In case you have troubles, ie crashes within pixelformat setup etc, it might be interesting if this may impact your behavior. - ChoosePixelFormat(long, PIXELFORMATDESCRIPTOR) - DescribePixelFormat(long, int, int, PIXELFORMATDESCRIPTOR) - GetPixelFormat(long) - SetPixelFormat(long, int, PIXELFORMATDESCRIPTOR) - SwapBuffers(long)
* | GLContext/NativeSurface Impl's toString(): Add lock.toString()Sven Gothel2012-01-082-6/+8
| |
* | GLContext*/GLDrawableHelper: Fix consistency of recursive ↵Sven Gothel2012-01-088-254/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makeCurrent()/release()/destroy() calls ; Enable context switch tracing ; GLCanvas: proper AbstractGraphicsDevice destruction GLContext*/GLDrawableHelper: Fix consistency of recursive makeCurrent()/release()/destroy() calls Utilizing volatile and lock.tryLock(0) for lockConsiderFailFast(), reducing redundant synchronization and using RecursiveLock implicit sync. GLContext 'early-out' is the case where the thread already holds the context, ie. context is already current and the native makeCurrent is skipped. makeCurrent()'s 'early-out' w/o incr. the recursive lock of GLContext and it's NativeSurface could lead to asymetry in lock/unlock count with release()/destroy() calls. The 1st release actually released the native ctx already. Properly utilize recursive lock/unlock in all cases and impl. 'early-out' after locking. Following the above in GLDrawableHelper.invokeGL()'s 'early-out' case as well, ie calling makeCurrent()/release() symmetrical. Introduce GLDrawableHelper.disposeGL(), which issues dispose on all GLEventListeners within a current context and issued context destruction directly. This simplifies GLAutodrawable's destroy/dispose calls and ensures that the above sequence of events happens atomically (lock is being hold until destruction). Enable context switch tracing If property 'jogl.debug.GLContext.TraceSwitch' is defined, trace context switch. GLCanvas: proper AbstractGraphicsDevice destruction
* | Animator*: Clarify debug outputSven Gothel2012-01-072-6/+8
| |
* | Fix bug 549 - Incorrect calculation of count value in GLUniformData due to ↵Sven Gothel2012-01-051-3/+3
| | | | | | | | | | | | | | | | | | ignored buffer position. This was disclosed by testing agains the Intel HD 3000 GPU, resulting in an INVALID OPERATION GL error (correct). Other driver ignored this mismatch ..
* | GLJPanel: Fix dispose of backend (J2DOGL thread, no double dispose)..,Sven Gothel2011-12-225-138/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLJPanel: - fix dispose of backend - proper J2DOGL thread - no double dispose - remove VERBOSE - no dispose regenerate flag - add @Overrride - more safe createContext(..) impl - setSynchronized(true); for all backends - ensure AbstractGraphicsDevice close() is being called GLDrawableHelper: - Clarify w/ isDisposeAction = null==initAction GLPbufferImpl: - ensure AbstractGraphicsDevice close() is being called Java2D: - remove VERBOSE -
* | GLBuffer: Add NV_texture_shader HILO format and HILO16 typev2.0-rc5rc_fiveSven Gothel2011-12-191-8/+24
| |
* | CgDynamicLibraryBundleInfo: Add TempJarCache usage for atomic native jar (of ↵Sven Gothel2011-12-182-1/+20
| | | | | | | | | | | | | | atomic java JAR) - GLProfile, NWJNILibLoader, NEWTJNILibLoader: Issue Platform.initSingleton() upfront within priviledge block.
* | Fix regression of commit 47dc069104723f3d2e8d9ebdd700182e067163d0: Lock ↵Sven Gothel2011-12-181-131/+140
| | | | | | | | shared surface before using it's HDC for pbuffer creation
* | MaxOSXWindowSystemInterface: deleteContext / releaseNSOpenGLLayer:Sven Gothel2011-12-172-10/+25
| | | | | | | | | | - release on main-thread doesn't wait anymore - use recursive lock
* | MacOSXCGLContext Offscreen Layer: Throw exception in case drawable is not ↵Sven Gothel2011-12-171-2/+5
| | | | | | | | realized or texture size is invalid.
* | New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and ↵Sven Gothel2011-12-171-31/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NewtCanvasAWT/GLCanvas (delegation) ; Fix GLCanvas OffscreenLayerSurface usage. JAWTWindow.destroy(): - No more getGraphicsConfiguration().getScreen().getDevice().close() call, since the configuration (hence the device) is passed @ creation and owned by the caller. New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and NewtCanvasAWT/GLCanvas (delegation) - Abstract offscreenLayer option to be delegated by using classes - Allow offscreen testing of GLCanvas as well (like NewtCanvasAWT) Fix GLCanvas OffscreenLayerSurface usage - common 'createDrawableAndContext()' for context and drawable instance creation - addNotify() calls createDrawableAndContext() after super.addNotify() to be able to lock the surface (JAWTWindow) and hence to determine offscreen usage. - reshape(...) issues recreation 'dispose(true)' in case of using an offscreen layer - dispose() explicitly destroys the JAWTWindow NewtCanvasAWT: - explicitly close the device of the JAWTWindow (as GLCanvas does) Tests: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT
* | GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) ↵Sven Gothel2011-12-1711-41/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | @ creation GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) @ creation, following deferred creation like onscreen drawables. This allows using offscreen drawables in classes like GLCanvas, where realization is deferred due to pending valid size. Only createGLPBuffer() realizes the offscreen pbuffer drawable immediatly to reduce the impact on user-code. GLDrawableFactoryImpl.createGLDrawable(): - Simplify OffscreenLayerSurface validation and check it first regardless of the chosenCaps to get a chance to use pbuffer.
* | GLDebugMessageHandler: Move Windows 32bit exclusion to init() block ↵Sven Gothel2011-12-131-13/+12
| | | | | | | | signaling no extension is available.
* | GLDebugMessageHandler: Disable Windows 32bit due to 32bit on 64bit ↵Sven Gothel2011-12-132-15/+34
| | | | | | | | JVM/OpenGL-Driver issues
* | MacOSXCGLContext.isGLProfileSupported(): No GL3* on pre lion - early outSven Gothel2011-12-131-0/+5
| |
* | setGLFunctionAvailability(..): Reduce the calls to resetProcAddressTable() ↵Sven Gothel2011-12-139-43/+69
| | | | | | | | | | | | | | | | | | | | | | 12 -> 7 in initialization. Reducing the calls to resetProcAddressTable() 12 -> 7 in initialization, saves: Linux/AMD: 600ms -> 300ms Linux/NV: 161ms -> 112ms OSX 10.7/NV: 522ms -> 397ms Still some freezes on OSX 10.6.8/NV .. further analysis is going on.
* | Fix GLDrawableFactory lack of GLProfile initialization in case get*Factory() ↵Sven Gothel2011-12-131-7/+3
| | | | | | | | is called 1st, add tests. Add performance numbers of init/shutdown in tests.
* | GLDrawableHelper.reshape(): check whether to call GLEventListener's init() ↵Sven Gothel2011-12-111-3/+8
| | | | | | | | hook or not
* | Fix concurrency bug of GLProfile initialization ; Fix SharedResourceRunner ↵Sven Gothel2011-12-1110-187/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dead' thread (Applets) GLDrawableFactory: - clarify: public getWasSharedContextCreated(..) -> protected createSharedResource(..) - add: getSharesResourceThread() GLProfile: - proper locking of initSingletion(..) path: - Use RecursiveThreadGroupLock and add/remove GLDrawableFactory's sharesResourceThread while creating it's the sharedResource. This simplifies and fixes GLProfile's locking code. - Fix and simplify initSingleton(boolean) API doc - mark it deprecated. - Add initSingleton() for controlled initialization only, pairing w/ shutdown(..) Remove initSingleton(boolean) calls in code and test! +++ Fix SharedResourceRunner 'dead' thread (Applets) In Applets, stopping an Applet makes the browser Java plugin interrupting and killing all related threads, including our SharedResourceRunner thread. - Validate whether the shared resource thread is alive - Catch interruption in shared resource thread and assume it's a kill signal - releaseSharedResource: clear devicesTried set
* | New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle ↵Sven Gothel2011-12-017-92/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Management - Leave Platform, .. TempJarCache untouched. - GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched, for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency. - SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory - COMPLETE: additionally shutdown GLContext* Clear all cached GL/GLX proc-address and device/context mappings. - Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets - X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources. - JAWTWindow.destroy(): Close the delegated device. In case it's X11 this closes the exclusive opened X11 Display.
* | GLContext fix shutdown(): Clear proc address tables and extension cache ↵Sven Gothel2011-12-012-5/+12
| | | | | | | | (GLContextImpl)
* | Minor edits.Sven Gothel2011-12-014-16/+1
| |
* | GLProfile: use dbl checked locking w/ volatile ; Proper shutdown sequence.Sven Gothel2011-12-011-26/+36
| |
* | GLDrawableFactory: Implementations lifecycle is handled via ↵Sven Gothel2011-12-015-143/+211
| | | | | | | | constructor/destroy()
* | Move manual GDI utils to GDIUtil ; Minor cleanup.Sven Gothel2011-12-012-2/+5
| | | | | | | | | | | | RegisteredClassFactory: Reference the factories itself instead of the RegisteredClass. This enables the shutdown hook to clear the factories state, which is required for proper recreation.
* | More Robust GLProfile Initialization ; Add NativeWindowFactory ShutdownSven Gothel2011-11-308-25/+70
| | | | | | | | | | | | | | | | | | | | | | | | More Robust GLProfile Initialization - Catch GLException in GLDrawableFactory getWasSharedContextCreated(device) impl., which may fail (See comment on Firefox/Chorme EGL deployed library for Windows). - If getWasSharedContextCreated(devide) fails, set respective factory availability to false, ie. hasDesktopGLFactory, hasEGLFactory, .. Add NativeWindowFactory Shutdown - Currenly a dummy entry, may evolve. X11Util shutdown is issued by respective GLDrawableFactory
* | GLContextImpl*: createImpl() / makeCurrentImpl() refinement / robostnessSven Gothel2011-11-2915-49/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | createImpl(): If successful must leave context current. makeCurrentImpl(): Is only called if context is not just created, hence the boolean parameter 'boolean newCreatedContext' is removed. This clearifies and actually cleans up the native makeContextCurrent/releaseContext call pairs. MacOSXCGLContext: CGL and NS impl. of native makeContextCurrent/releaseContext uses CGL locking to provide a thread safety. This is recommended in OS X OpenGL documentation on [shared context] multithreaded use cases. Post creation code, as seen in some pbuffer cases is moved to overriden createImpl() methods.
* | Fix Bug 527: Creating a context w/ shared context, while the latter is in ↵Sven Gothel2011-11-289-55/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use (threading) Bug 527 describes the situation where wglShareLists() fails (throws exception) while the shared context is in use by another thread (some Animator). It was reported by Jerome Jouvie. The exception happens not everytime, but at least around 20% on manual tests I have performed on the Windows platform. The context in question are all JOGL's GL2, which natively where bound to an OpenGL 3.0 profile. The WGL_ARB_create_context spec says http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt: +++ Future versions of OpenGL may only support being added to a share group at context creation time. Specifying such a version of a context as either the <hglrc1> or <hglrc2> arguments to wglShareLists will fail. wglShareLists will return FALSE, and GetLastError will return ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB. +++ Hence the 1st patch was to remove 'wglShareLists()' usage in case we use the new WGL_ARB_create_context context creation method. Even though this is a desired change, and works in general, it didn't fix the issue. It seems that the shared context, which is passed @ new context creation, cannot be used while it is in use itself in another thread. This conclusion leads to the actual fix, ie. locking the shared context while creating the new context which shares it. Manual tests using this patch could not reproduce this issue (40 attempts). Test: TestSharedContextListNEWT2
* | MacOSX: Disable native verbositySven Gothel2011-11-262-2/+2
| |
* | X11Util: Remove wrapped/locked X11Lib methodsSven Gothel2011-11-266-20/+20
| | | | | | | | | | We shall lock a level above due to differentiation of XLockDisplay/RecursiveLock using X11/AWT ToolkitLock.