summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and ↵Sven Gothel2011-12-1710-132/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-135-19/+42
| | | | 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-1311-44/+123
| | | | | | | | | | | 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 nano -> milli (10e6 -> 1e6) .. ooopsSven Gothel2011-12-135-19/+19
|
* Fix GLDrawableFactory lack of GLProfile initialization in case get*Factory() ↵Sven Gothel2011-12-1311-13/+154
| | | | is called 1st, add tests. Add performance numbers of init/shutdown in tests.
* JOGLNewtApplet1Run: Config and add GLEventListener before hooking ↵Sven Gothel2011-12-111-7/+7
| | | | GLWindow/NewtCanvasAWT to AWT Applet Container
* 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-1168-312/+501
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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
* Update etc/test* scripts: Remove native lib config, use native-jars. Remove ↵Sven Gothel2011-12-074-34/+14
| | | | old JOGL jars in classpath
* Add siggraph 2011, p70-rsantinav2.0-rc4Sven Gothel2011-12-021-1/+8
|
* NEWT EVENT_MOUSE_WHEEL_MOVED: Fix Bug 413 - Generate proper mouse wheel events.Sven Gothel2011-12-026-16/+75
| | | | | | | | | | > 0: UP < 0: DOWN See MouseEvent.getWheelRotation() for details. OSX/Windows: Default to wheel 'button' 1 OSX: Properly report '<0' X11: Synthesize wheel events by mapping buttons 4/5 and 6/7 to wheel 1 and 2.
* Remove GLProfile.initSingleton(..) out of static init blockSven Gothel2011-12-021-4/+0
|
* Test AWT Translucency: Use ReflectionUtil to use com.sun.awt.AWTUtilities, ↵Sven Gothel2011-12-023-6/+22
| | | | n/a on some AWT impl.
* More AWT-EDT invokeAndWait-wrapping for Frame show/disposeSven Gothel2011-12-025-56/+57
|
* New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle ↵Sven Gothel2011-12-0123-130/+666
| | | | | | | | | | | | | | | | | | | | | 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)
* Fix 96205926731aeb61a862c87974f611d814937c54 GDIUtil native code.Sven Gothel2011-12-011-1/+1
|
* Fix Bug 522: NEWT requestFocus() causes a crash if !isNativeValid()Sven Gothel2011-12-011-1/+1
|
* Adapt to GlueGen commit 7e6cf46ed2e0e9772f79e06437596056efa8c682: ↵Sven Gothel2011-12-012-2/+2
| | | | JNILibLoaderBase addNativeJarLibs(..)
* Minor edits.Sven Gothel2011-12-017-27/+39
|
* X11Util / GDISurface RobustnessSven Gothel2011-12-012-48/+58
| | | | | | | | X11Util: - shutdown: keep list of displays, if not really closed. - Init default display name in initSingleton. GDISurface: Check ReleaseDC and throw exception if fails
* Complete commit 2c0a0981f7e1376064abd981c79c65c9d1b57410 ; Missed native impl.Sven Gothel2011-12-011-17/+17
|
* 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-0112-106/+163
| | | | | | 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.
* JOGLNewtApplet1Run: Issue GLProfile.shutdown() to adapt to the 'new' plugin ↵Sven Gothel2011-11-301-3/+5
| | | | | | | | | | | | lifecycle. Applet 'restart' (init.start.stop.destroy .. init.start...) didn't work on Windows browsers (Firefox, Safari, Chrome, ..) w/ JVM 6u26..6u29. It seems that after destroy we loose the ClassLoader already (plugin2) hence we need to bind to the native resources again. Solution is to map the JOGL lifecycle of GLProfile [initSingleton()..shutdown()] to the Applet's [init..destroy].
* More Robust GLProfile Initialization ; Add NativeWindowFactory ShutdownSven Gothel2011-11-309-25/+83
| | | | | | | | | | | | 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
* Windows: Bump JVM to 6u29Sven Gothel2011-11-307-13/+13
|
* NEWTMacWindow:View: Make lock recursive ..Sven Gothel2011-11-292-15/+26
| | | | | Attempt to fix the shared-context-multithreading bug (eg. TestSharedContextVBOES2NEWT2) via proper locking .. but seems not to be sufficient (yet).
* NEWT MacWindow: the softLock (pthread mutex) is now always blocking (remove ↵Sven Gothel2011-11-291-18/+0
| | | | non blocking code)
* GLContextImpl*: createImpl() / makeCurrentImpl() refinement / robostnessSven Gothel2011-11-2916-50/+122
| | | | | | | | | | | | | | | 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.
* MacOSX: Expose CGL's CGLLockContext(..) and CGLUnlockContext(..) - to ↵Sven Gothel2011-11-291-0/+2
| | | | provide required locking in multithreading environment
* Test: Add TestSharedContextVBOES2NEWT2 (ES2 variant of ↵Sven Gothel2011-11-292-2/+160
| | | | TestSharedContextListNEWT2)
* Test: Forgot to uncomment package name of new test for ↵Sven Gothel2011-11-291-1/+1
| | | | 97218b88af9113740b3704a3666d7356cdc83cd0
* NEWT ScreenMode: Use unified ScreenMode in impl; X11Screen: Be verbose if TO ↵Sven Gothel2011-11-282-7/+7
| | | | reached, ie not successfully changed mode.
* Fix Bug 527: Creating a context w/ shared context, while the latter is in ↵Sven Gothel2011-11-2812-64/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* NEWT MacWindow: Fix positionChange() Usage ; Fix getLocationOnScreenImpl()Sven Gothel2011-11-271-32/+27
| | | | | | | | | - Native invocation of positionChange(x,y) uses screen coordinates of client area. Manual invocation shall respect the semantics - hence calling super.positionChanged w/ client coords. - getLocationOnScreenImpl() shall return the screen coordinates of the client area - Use getTopLevelLocationOnScreen(), ie substract Insets of getLocationOnScreenImpl()
* MacWindow: Impl. DriverUpdatePosition; Alias position2TopLevel -> ↵Sven Gothel2011-11-275-73/+88
| | | | | | | | getLocationOnScreenImpl Since the MacWindow position needs to be changed in concert with the parent, we need to be triggered to update ours. AWTParentWindowAdapter issues 'updatePosition()' if DriverUpdatePosition is implemented.
* JAWTWindow: Impl. insets (if AWT component is a Container)Sven Gothel2011-11-271-3/+14
|
* NEWT: Add DriverUpdatePosition interface; Clarify NativeWindow API doc ↵Sven Gothel2011-11-273-4/+19
| | | | | | | (position) DriverUpdatePosition: Interface tagging driver requirement of absolute positioning, ie. depend on parent position.
* NEWT OSX: Add stopNSApplication(), revert commit ↵Sven Gothel2011-11-273-9/+70
| | | | c26d6005e1fe74e9aee01d9d72942f566884fcd2
* MacOSX: Disable native verbositySven Gothel2011-11-264-4/+4
|
* NEWT OSX closeWindow: simple close, no extra view detachment etcSven Gothel2011-11-261-3/+0
|
* Revert some changes: X11Screen/RANDR, X11Util (XInitThreads/XLockDisplay), ↵Sven Gothel2011-11-264-11/+36
| | | | | | | | | | | | | | | NEWT XDisplay Locking Revert X11Screen RANDR commit 8cecd0c2963d982aa119cbb07698e56b9c271188, ie. use default 'render' display connection, best results on Ubuntu, Solaris, CentOS (no failures). Revert X11Util (XInitThreads/XLockDisplay) rational logic, commit 0314be79a7a93931a74fe4322bc78e699d7741e9, X11Util.HAS_XLOCKDISPLAY_BUG:=true and X11Util.XINITTHREADS_ALWAYS_ENABLED:=true. Which enables always utilizing XInitThreads() either before or after AWT initialization, as well as disable all XLockDisplay/XUnlockDisplay locks. Rever NEWT XDisplay X11 basic Locking commit 50100b85ce5fde48788efbc2211b26fb9d7c9dfd, ie use null locking if X11Util.HAS_XLOCKDISPLAY_BUG and X11Util.XINITTHREADS_ALWAYS_ENABLED.
* NativeWindow build: Remove duplicate class ↵Sven Gothel2011-11-261-3/+3
| | | | X11AWTGraphicsConfigurationFactory in JAR files
* X11Screen RANDR: Use temp display connection due to arbirary failures sometimesSven Gothel2011-11-261-6/+5
|
* X11Util: Remove wrapped/locked X11Lib methodsSven Gothel2011-11-2615-255/+42
| | | | | We shall lock a level above due to differentiation of XLockDisplay/RecursiveLock using X11/AWT ToolkitLock.