aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix FBObject DEPTH_STENCIL renderbuffer usageSven Gothel2012-10-052-43/+51
| | | | | | If DEPTH_STENCIL was selected, recreate destroyed the common buffer when stencil was being 'reset'. To unify and simplify code, if DEPTH_STENCIL stencil == depth reference.
* UITestCase.snapshot: Add Depth and Stencil bits to filenameSven Gothel2012-10-051-2/+4
|
* Use helper.isExternalAnimatorAnimating() instead of ↵Sven Gothel2012-10-053-3/+4
| | | | helper.isAnimatorAnimating() for decision whether to display() now; Minor API comments.
* Fix Bug 572 (2nd time): GLCanvas.validateGLDrawable() @ display() and ↵Sven Gothel2012-10-059-45/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | reshape() ; GLCanvas.reshape() only if drawble valid ; GLCanvas.validateGLDrawable() also test isDisplayable() ; Fix size validation ; resizeOffscreenDrawable(..) don't validate 'safe' size 1x1 - GLCanvas.validateGLDrawable() @ display() and reshape() To help users using GLCanvas w/ having a realized GLCanvas/Drawable, validateGLDrawable() is also called at reshape(). This shall ensure a valid drawable after even a non AWT-EDT issued first setVisible(). - GLCanvas.reshape() only if drawble valid Otherwise offscreen reshape attempts would happen even on unrealized drawable, which is not necessary. - GLCanvas.validateGLDrawable() also test isDisplayable() To make sure the native peer is valid, also test isDisplayable() - Fix size validation Since we have experienced odd size like 0 x -41 test each component, i.e. 0 < width && 0 < height. This is done through all JOGL/NEWT components. - resizeOffscreenDrawable(..) don't validate 'safe' size 1x1 In case method is called w/ odd size, i.e. 0 x -41, the safe size 1x1 is used. However, we cannot validate this size. Dump WARNING if odd size is detected.
* Fix regression of commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b: X11 ↵Sven Gothel2012-10-051-1/+5
| | | | | | DisplayDriver dispatchMessagesNative() aDevice NPE at finally The aDevice could be pulled via destroy message, hence add check if null.
* Fix SWTEDTUtil bug, where it simply doesn't start by an implicit 'invoke()' ↵Sven Gothel2012-10-053-5/+18
| | | | | | | | | | | | | - No NewtCanvasSWT resize, nor input event delivery. A new EDTUtil instance is not started automatically. Since SWTEDTUtil is attached to the DisplayImpl later in time, i.e. after it's native creation, there is no EDTUtil.invoke(..) call which started it. The not started SWTEDTUtil could not deliver any events. Fix: Start it explicitly - add API doc comment in Display.setEDTUtil(..)
* OSX Context: Fix caps determination for on-/offscreen since pformat's ↵Sven Gothel2012-10-041-22/+14
| | | | NSOpenGLPFAPixelBuffer is ambiguous
* Footprint Stats ; Fix Bug 624 - Compile and generate android JAR files ↵Sven Gothel2012-10-047-19/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (jogl-all-android.jar, jogl-test-android.jar) if android SDK JAR files are available. ; Split up atomic jogl-util.jar Compile and generate android JAR files (jogl-all-android.jar, jogl-test-android.jar) if android SDK JAR files are available. - See gluegen commit 55b4552aef7882c358d545d020d6f12c958ed8ed Also split up atomic jogl-util.jar - jogl-util.jar -> jogl-util.jar + jogl-util-graph.jar Footprint Stats: This demonstrates small footprint of a minimum configuration, all numbers in kilobytes (du -ksc). NOTE the min size of ~ 1MB! JOGL ALL 220 kB gluegen-rt.jar 5180 kB jogl-all.jar 4 kB libgluegen-rt.so.gz 4 kB libnativewindow_awt.so.gz 12 kB libnativewindow_x11.so.gz 100 kB libjogl_desktop.so.gz 20 kB libnewt.so.gz 5540 kB total JOGL Min X11 Min egl es1 es2 220 kB gluegen-rt.jar 296 kB atomic/jogl-core.jar 156 kB atomic/jogl-glmobile.jar 284 kB atomic/jogl-util.jar 76 kB atomic/nativewindow-core.jar 120 kB atomic/newt-core.jar 28 kB atomic/nativewindow-os-x11.jar 28 kB atomic/newt-driver-x11.jar 4 kB libgluegen-rt.so.gz 48 kB libjogl_mobile.so.gz 12 kB libnativewindow_x11.so.gz 20 kB libnewt.so.gz 1292 kB total JOGL Android - mobile egl es1 es2 224 kB gluegen-rt-android.jar 3020 kB jogl-all-android.jar 4 kB libgluegen-rt.so.gz 48 kB libjogl_mobile.so.gz 3296 kB total JOGL Min Android/Mobile Min egl es1 es2 224 kB gluegen-rt-android.jar 296 kB atomic/jogl-core.jar 156 kB atomic/jogl-glmobile.jar 8 kB atomic/jogl-os-android.jar 284 kB atomic/jogl-util.jar 76 kB atomic/nativewindow-core.jar 120 kB atomic/newt-core.jar 28 kB atomic/newt-driver-android.jar 4 kB libgluegen-rt.so.gz 48 kB libjogl_mobile.so.gz 1244 kB total
* Fix regression of commit a644d779ab19cb1d200ae4ba567b9c042c34b337, cannot ↵Sven Gothel2012-10-043-12/+15
| | | | | | compile FixedFuncHook due to removed 'isDirty()' - getModifiedBits() -> getModifiedBits(boolean clear)
* FixedFuncPipeline: Cleanup warnings ..Sven Gothel2012-10-041-7/+7
|
* ShaderState: Adding Class API doc and removing attached object w/ 'int' key, ↵Sven Gothel2012-10-041-22/+12
| | | | similar to GLContext change 6d241fc2a46413ee478985d676d2481c5a7ed119
* Update PMVMatrix/GLMatrixFunc API doc and refine PMVMatrix update / ↵Sven Gothel2012-10-047-269/+1152
| | | | | | | | | | | | | | | | | | | | | | get-Mvi/Mvit-Matrix operation. (Minor API change) Using bitmask for requested Mvi and Mvit matrices, same as dirty-bits to ease matching and update operation. Update of Mvi and Mvit will be performed only if it's dirty-bit and request-bit set within update(). The individual dirty bit is cleared only if it's matrix update is performed. Update is also issued at get-Mvi/Mvit-Matrix operations to ensure proper values w/o update call w/o clearing the modified-bits. update() returns true if the Mvi or Mvit matrix got updated _or_ one of the modified bits is set. update() clears the modified-bits. Adding explicit getModifiedBits() to get and clear it's state. Adding unit test. Lots of API docs ..
* Fix regression of fbe331f013608eb31ff0d8675f4e4c9881c9c48b [Remove ↵Sven Gothel2012-10-023-16/+8
| | | | | | | | | XInitThreads()] NativeWindowFactory.getDefaultToolkitLock() is no more a global singleton, but an instance which has to track/lock a single resource. Hence the decoration w/ it in GLDrawableFactory is useless and applying lock/unlock on a new instance also a bug/regression.
* Misc: tests.shSven Gothel2012-10-021-6/+5
|
* NativeWindowFactory: Remove 'remedy' of Bug 613 Commit ↵Sven Gothel2012-10-022-25/+4
| | | | | | 92398025abdabb2fdef0d78edd41e730991a6f94 GlobalToolkitLock for create/destroy Turns out on it has no effect and ATI prop. driver still has XCB failures at this point.
* Misc: Add commented-out NEWT X11/XCB-Event and X11ScreenRandR1[13] ↵Sven Gothel2012-10-028-1/+1355
| | | | | | | | | | compilation ; ... Adding [dead] native source files for NEWT/X11: - X11Event and XCBEvent - X11ScreenRandR11 X11ScreenRandR13 They are currently excluded from compilation, however I like do version them for later use.
* GLRendererQuirks.NoDoubleBufferedPBuffer: Set if ( mesa || gallium ) && hwAccelSven Gothel2012-10-022-5/+14
|
* FBObject/GLFBODrawable: Debug / glError detectionSven Gothel2012-10-022-12/+21
| | | | | | | - Enh. Debug output a bit - FBObject: Detect glError @ syncFramebuffer MSAA blit, throw GLException if glError to fail-fast - TODO: May add Mesa NoFBOMSAA Quirk to disable even trying it ..
* Fix commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b (Bug 616 - Remove ↵Sven Gothel2012-10-022-17/+6
| | | | | | | | | XInitThreads()) X11Util/Native: Fix X11Util_initialize0() arguments were wrong and code still invoked XInitThreads() .. woops; Added missing included "jogamp_nativewindow_x11_X11Util.h" incl. it's generation via javah, which was the culprit of not detecting it at compile time. This is a fix for commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b
* Relax Bug 613 workaround of commit 92398025abdabb2fdef0d78edd41e730991a6f94Sven Gothel2012-10-0220-108/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | Utilizing a GlobalToolkitLock in general to lock the display connection results in deadlock situations where locked surfaces signal other [offscreen] surfaces to render. We have to see whether we find a better solution, for now sporadic XCB assertion still happen. But it is preferrable to point to the root cause, then to jumping through hoops to complicate locking or even to deadlock. Locking: - X11GLXGraphicsConfigurationFactory add missing device locking in: - getAvailableCapabilities - chooseGraphicsConfigurationStatic - Newt/X11Window: Discard display events after window close. Relax ATI XCB/threading bug workaround: - ToolkitProperties: requiresGlobalToolkitLock() -> hasThreadingIssues() - NativeWindowFactory: Don't use GlobalToolkitLock in case of 'threadingIssues' the impact is too severe (see above) - NativeWindowFactory: Add getGlobalToolkitLockIfRequired(): To be used for small code blocks. If having 'threadingIssues' a GlobalToolkitLock is returned, otherwise NullToolkitLock. - X11GLXContext: [create/destroy]ContextARBImpl: Use 'NativeWindowFactory.getGlobalToolkitLockIfRequired()' for extra locking Misc Cleanup: - *DrawableFactory createMutableSurface: Also create new device if type is not suitable - *DrawableFactory createDummySurfaceImpl: Pass chosenCaps and use it (preserves orig. requested user caps)
* JAWTUtil ToolkitLock: Add lock counter to make lock validation recursive ↵Sven Gothel2012-09-301-2/+10
| | | | (Fix regression of commit 92398025abdabb2fdef0d78edd41e730991a6f94)
* test script: remove deleted unit testSven Gothel2012-09-301-1/+0
|
* NullToolkitLock.validateLocker(): Throw exception if locking is required ↵Sven Gothel2012-09-302-6/+4
| | | | (detecting impl. bugs)
* X11Util: Detailed closing information only in DEBUG mode, just print summarySven Gothel2012-09-301-4/+9
|
* Merge remote-tracking branch 'origin/master'Sven Gothel2012-09-301-0/+20
|\
| * Merge pull request #52 from xranby/bcm.vc.iv-autodetectSven Gothel2012-09-291-0/+20
| |\ | | | | | | _getNativeWindowingType() TYPE_BCM_VC_IV autodetection.
| | * Add braces and fix indentation to conform with jogl coding standards.Xerxes Rånby2012-09-301-2/+4
| | |
| | * ".bcm.vc.iv" is enough now -> NEWT agnostic relative package path.Xerxes Rånby2012-09-301-1/+1
| | |
| | * _getNativeWindowingType() TYPE_BCM_VC_IV autodetection.Xerxes Rånby2012-09-301-0/+18
| |/ | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | Bug 623: X11Util adds property ↵Sven Gothel2012-09-301-1/+6
| | | | | | | | 'nativewindow.debug.X11Util.ATI_HAS_NO_MULTITHREADING_BUG' to disable GlobalToolkitLock workaround for testing.
* | Workaround for Bug 623: Sporadic XCB assertion failures w/ ATI proprietary ↵Sven Gothel2012-09-3021-88/+496
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver and w/o native X11 locking The proprietary ATI X11 driver does not handle multi-threaded [GL] clients well, i.e. triggers an XCB assertion 'from time to time'. It almost seems like that the driver either: - aliases all display connections to it's connection name, i.e. server; or - utilizes a build-in display connection w/o locking, used for some reason +++ - X11Lib: Add QueryExtension(dpy, name) allowing early driver determination w/o GL - X11Util detects 'requiresGlobalToolkitLock' and 'markAllDisplaysUnclosable' via X11 extensions. In case certain ATI extensions are available, both are set to true. - X11GLXDrawableFactory: Dropped setting 'markAllDisplaysUnclosable', using X11Util's detection (see above). - New GlobalToolkitLock to satisfy certain driver restrictions (ATI's XCB multithreading bug) - NativeWindowFactory handles new property requiresGlobalToolkitLock, in which case the new GlobalToolkitLock is being used instead of ResourceToolkitLock. - JAWTUtil ToolkitLock locks GlobalToolkitLock 1st to match new 'requiresGlobalToolkitLock' property. - Document static method requirement of X11Util, GDIUtil and OSXUtil via marker interface ToolkitProperties - ToolkitLock: New method 'validateLocked()', allowing use to validate whether the device/toolkit is properly locked and hence to detect implementation bugs. See unit test class: ValidateLockListener
* Cache XineramaIsEnabled(dpy) per display-name in X11Util minimize triggering ↵Sven Gothel2012-09-292-8/+24
| | | | | | | | | | | | | | | | ATI driver bug of sporadic XCB errors and to reduce server roundtrips. Enhances commit: e4176f4e76f519b3599ad557210def3d35266e7b X11Util.XineramaIsEnabled(dpy) hash maps the Xinerama enable result to the dpy-name. Minimize triggering ATI driver bug of sporadic XCB errors: Our multithreading code somehow triggers an _XReply in XQueryExtension beside other functions, which fails the XCB assertion: ../../src/xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed. This only appears w/ ATI driver and is probably due to a race condition in the driver (?). This change also reduces server roundtrips / querying time for the cost of 1 hash-map.
* Misc X11: Add GLX_MESA_swap_control; GLXExtensions (private); X11GLXContext ↵Sven Gothel2012-09-2910-25/+642
| | | | commented out GLX_MESA_swap_control; native test of Mesa context-retarget bug, cannot reproduce yet.
* GLContext.makeCurrent(): Clean API docSven Gothel2012-09-291-13/+17
|
* GLDrawableHelper.init(..): Avoid double reshape if subsequent display issues ↵Sven Gothel2012-09-295-7/+10
| | | | | | reshape Adding boolean sendReshape argument to be set to false, if subsequent display won't reshape.
* Adding Mesa Quirk 'NoSetSwapIntervalPostRetarget': SIGSEGV on ↵Sven Gothel2012-09-286-38/+64
| | | | | | | | | | | | setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel) Analyzing 'TestGLContextDrawableSwitchNEWT' crash at setSwapInterval -> dri2SetSwapInterval after retargeting the context (new drawable association). Turns out Mesa's dri2SetSwapInterval may have a bug. +++ GLContext TRACE_SWITCH: Add drawable handle to debug/trace output.
* X11 NativeWindow: Fix Error and IOError handler, i.e. NPE checks and no JVM ↵Sven Gothel2012-09-282-39/+35
| | | | dependency (signal is async); X11Util: XSync w/ discard reusable Display when queue-in.
* Texture: Clarifiy API doc of getTextureObject(GL)Sven Gothel2012-09-281-1/+6
|
* NativeWindow/X11 + NEWT/X11: Cache 'isXineramaEnabled()' to reduce X11 ↵Sven Gothel2012-09-285-16/+22
| | | | server roundtrips.
* NEWT X11 ScreenMode: Ignore invalid rotation eventSven Gothel2012-09-283-56/+53
|
* GLXUtil: Lock X11 DeviceSven Gothel2012-09-284-49/+98
|
* FBObject: Clarify reset(..), resetSamplingSink(..) ; Rename ↵Sven Gothel2012-09-274-46/+74
| | | | | | | | | | | syncFramebuffer(..) -> syncSamplingSink(..) - reset(..) adds a new argument, boolean resetSamplingSink, allowing to trigger a reset on the samplink sink as well. Use cases are documented. - made public: resetSamplingSink() - Rename syncFramebuffer(..) -> syncSamplingSink(..) to clarify semantics
* Fix Bug 616: X11: Remove XInitThreads() dependency while cleaning up device ↵Sven Gothel2012-09-2738-623/+701
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | locking, resulting in a native-lock-free impl. The X11 implementation details of NativeWindow and NEWT used the X11 implicit locking facility XLockDisplay/XUnlockDisplay, enabled via XInitThreads(). The latter useage is complicated within an unsure environment where the initialization point of JOGL is unknown, but XInitThreads() requires to be called once and before any other X11 calls. The solution is simple and thorough, replace native X11 locking w/ 'application level' locking. Following this pattern actually cleans up a pretty messy part of X11 NativeWindow and NEWT, since the generalization of platform independent locking simplifies code. Simply using our RecursiveLock also speeds up locking, since it doesn't require JNI calls down to X11 anymore. It allows us to get rid of X11ToolkitLock and X11JAWTToolkitLock. Using the RecursiveLock also allows us to remove the shortcut of explicitly createing a NullToolkitLocked device for 'private' display connections. All devices use proper locking as claimed in their toolkit util 'requiresToolkitLock()' in X11Util, OSXUtil, .. Further more a bug has been fixed of X11ErrorHandler usage, i.e. we need to keep our handler alive at all times due to async X11 messaging behavior. This allows to remove the redundant code in X11/NEWT. The AbstractGraphicsDevice lifecycle has been fixed as well, i.e. called when closing NEWT's Display for all driver implementations. On the NEWT side the Display's AbstractGraphicsDevice semantics has been clarified, i.e. it's usage for EDT and lifecycle operations. Hence the X11 Display 2nd device for rendering operations has been moved to X11 Window where it belongs - and the X11 Display's default device used for EDT/lifecycle-ops as it should be. This allows running X11/NEWT properly with the default usage, where the Display instance and hence the EDT thread is shared with many Screen and Window. Rendering using NEWT Window is decoupled from it's shared Display lock via it's own native X11 display. Lock free AbstractGraphicsDevice impl. (Windows, OSX, ..) don't require any attention in this regard since they use NullToolkitLock. Tests: ====== This implementation has been tested manually with Mesa3d (soft, Intel), ATI and Nvidia on X11, Windows and OSX w/o any regressions found in any unit test. Issues on ATI: ============== Only on ATI w/o a composite renderer the unit tests expose a driver or WM bug where XCB claims a lack of locking. Setting env. var 'LIBXCB_ALLOW_SLOPPY_LOCK=true' is one workaround if users refuse to enable compositing. We may investigate this issue in more detail later on.
* Fix Bug 621, JVM Crashes During X11 Shutdown while closing all unclosed ↵x11_xinitthreadsSven Gothel2012-09-213-25/+47
| | | | | | | | | | | | | | | | | | | | display connections. This is a regression of JOGL commit f2cfb6119a3663715ed2d572643949b3bef58662 to fix Bug 610. Commit f2cfb6119a3663715ed2d572643949b3bef58662 closed all open display connections at JVM shutdown in order of their creation. This is required IF the driver is the proprietary ATI on X11. X11Util.setMarkAllDisplaysUnclosable(true) is called in this case. However, this behavior causes a SIGSEGV for other GPU driver, i.e. Nvidia :) This fix only closes the pending display connections in their respective order IF X11Util.getMarkAllDisplaysUnclosable() == true. Hence the 'new' cleanup as introduced in the offending commit is only performed on the erroneous ATI driver. Manually tested w/ TestGearsES2AWT, see it's commandline options for details.
* FBObject: Small cleanup of freeColorbufferImpl(gl, i) -> ↵Sven Gothel2012-09-211-27/+26
| | | | freeAllColorbufferImpl(gl)
* MacOSXCGLContext: Fix missing initialization of 'needsSetContextPBuffer' if ↵Sven Gothel2012-09-213-7/+9
| | | | not offscreen-layer.
* MacOSXCGLDrawableFactory: Cannot use shared context to retrieve quirks since ↵Sven Gothel2012-09-212-12/+23
| | | | it's transient, store it.
* NativeWindowFactory/NEWT: Use relative sub-package names in ↵Sven Gothel2012-09-202-8/+15
| | | | | | | | | | | | | | NativeWindowFactory's TYPE_* strings, not NEWT's; NEWTFactory: Use default NEWT package name if rel. 'path'. Use relative sub-package names in NativeWindowFactory's TYPE_* strings, not NEWT's Otherwise NEWT depends solely on NativeWindowFactory strings - Default subpackages denominate a relative path, i.e. start with a dot: '.egl', '.windows', '.x11' - Custom name may be absolute, eg: 'my.company.special.drivers.chip4' NEWTFactory: Use default NEWT package name if relative 'path'. - If NativeWindowFactory type starts w/ dot (rel. path), simply prepend the default NEWT package prefix otherwise use complete package name as-is.
* Add GLRendererQuirks; Fix shared EGL/ES resources;Sven Gothel2012-09-2020-278/+625
| | | | | | | | | | | | | | | | | | | | | | | Add GLRendererQuirks: - Contains centralized 'tagged' workarounds for GL renderer bugs (quirks) - Accessible via GLContext and GLDrawableFactory - Initialized in GLContext.setAvailability* - Simplify GLGraphicsConfigurationUtil.fixOffscreenGLCapabilities(..) & use Quirks - use quirks - instead of passing booleans for each config, pass factory & device Fix shared EGL/ES resources: - GLProfile needs to initialize EGLDrawableFactory's shared resources before desktop, so EGLDrawableFactory can use the fallback defaultDisplay & defaultSharedResource for host mapped sharedResources (hack). - If using defaultSharedResources for host mapped ones, do not go through initialization cycles - simply map (sharedResource + context). - EGLDrawableFactory: Use device's unique-key instead of connection only, since the latter causes a collision (EGL-connection == X11-connection).
* FBO tests: Add singleBuffer cmd-line option for offscreen-layered tests; ↵Sven Gothel2012-09-203-5/+24
| | | | FBOMRT: Allow test w/ only one attachment number (sure not MRT then)