summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix JOGL GLContextImpl ProcAddressTable and Extension CachingSven Gothel2012-02-136-39/+29
| | | | | | | | | Bug caused using wrong extension cache and probably the wrong procAddress table. - do not reuse local field value if not cached - issue resetState() after each createContextARBMapVersionsAvailable(..) query - remove cache entry for extension (copy/paste bug) - resetState() shall clean platform extProcAddressTable in specializations
* OpenGL ES/EGL OverhaulSven Gothel2012-02-1329-354/+715
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - GLProfile properly detects native EGL/ES1/ES2 on the 'desktop' device factory. This allows usage of Mesa's EGL/ES or Imageon's PVR emulation, etc. - GLProfile drops getDefaultDesktopDevice() and getDefaultEGLDevice() since both are aligned by getDefaultDevice(). - Fix GL_ARB_ES2_compatibility detection and utilize resulting isGLES2Compatible() where possible. This allows ES2 compatible desktop profiles to use core ES2 functionality (glShaderBinary() .. etc) even with a GL2ES2 desktop implementation. - EGLDrawable: If createSurface(..) fails (BAD_NATIVE_WINDOW) w/ surfaceHandle it uses windowHandle if available and differs. This allows the ANGLE impl. to work. - Properly order of EGL/ES library lookup: ES2: libGLESv2.so.2, libGLESv2.so, GLES20, GLESv2_CM EGL: libEGL.so.1, libEGL.so, EGL - *DynamicLookupHelper reference will be null if it's library is not complete (all tool libs, all glue libs and a ProcAddressFunc lookup function - if named). - Enhance GL version string (incl. ES2 compatible, hw/sw, ..) - GLBase: Fix docs and remove redundancies - Prepared (disabled) DesktopES2DynamicLibraryBundleInfo to be used for a real EGL/ES2 implementation within the desktop GL lib (AMD). Sadly it currenly crashed within eglGetDisplay(EGL_DEFAULT_DISPLAY), hence it's disabled.
* NEWT: Fix deadlock w/ AWT parent (NewtCanvasAWT) - focus window @ creation ↵Sven Gothel2012-02-081-3/+7
| | | | after releasing parent lock (AWT lock).
* 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
|
* Bug 551 validation.Sven Gothel2012-01-231-0/+150
| | | | | | Turns out, that the culprit (at least on my Win7 NVidia machine) is the runtime property "-Dsun.java2d.opengl=false". When _not_ setting this prop. the test runs fine.
* 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 branch 'master' of github.com:sgothel/joglSven Gothel2012-01-221-2/+15
|\
| * 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
* | | Fix Bug 516 (Determine Java Version) / Fix OS X 10.5 linkage (weak ↵Sven Gothel2012-01-221-0/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | framework, NEWT) - Fix Bug 516 (Determine Java Version). See gluegen: 64639b805a32338385421f168e12c1ef7f749d00 - Fix OS X 10.5 linkage (weak framework, NEWT) - Use weak framework linkage for all modules and frameworks: AppKit, QuartzCore, Cocoa, OpenGL, JavaNativeFoundation - NEWT: Handle NS exception while calling OS X >= 10.6 only methods: - 'setAllowsConcurrentViewDrawing()' - 'setCanDrawConcurrently()'
* | NEWT/OSX: Window close (release) on main thread, ensuring no 'main thread' ↵Sven Gothel2012-01-191-1/+2
| | | | | | | | event is pending
* | NativeWindow/OSX: Fix Offscreen CALayer SIGSEGV @ Shutdown (Cleanup referencing)Sven Gothel2012-01-194-27/+62
| | | | | | | | | | | | | | | | | | | | - allocate CALayer w/ invoking init: [[CALayer alloc] init] - attach CALayer to JAWTSurfaceLayer w/o autorelease: surfaceLayers.layer = layer; // already incr. retain count - destroy CALayer @ JAWTWindow destroy
* | UI Test AWTRobotUtil's toFront*(): retry requestFocus() within loop.Sven Gothel2012-01-191-11/+14
| |
* | UI Test / AWTRobotUtil: Relax and fix focus testsSven Gothel2012-01-185-39/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - toFront*(..) uses the AWT Window focus state, instead of our AWTWindowFocusAdapter, which removes false negatives. Often the focus is already hold on the Window where no focus change will be recognized by our AWTWindowFocusAdapter. - assertRequestFocusAndWait(..) recovers from lack of focus-lost event (if received focus-gained) and only dumps the case - returns success. - Since assertRequestFocusAndWait(..) implicitly tests the passed FocusAdapter and relaxes the constraints (see above) no more post-call assertions on the FocusAdapter is being performed (removed). - assertRequestFocusAndWait(..) is no more used on AWT Window or Frame, see 1st note above!
* | NEWT/X11: Fix Insets determination for undecorated / child window.Sven Gothel2012-01-181-53/+86
| | | | | | | | | | | | | | | | | | | | | | | | Due to latest changes, a bug is disposed where the native 'updateInsets' attempts to determine the window insets by it's parent window (fall-back). The latter works only in case of a top-level window. Adding query to the WM whether the window is decorated (top-level) or not. Attempt to use the fall-back parent window method in case of a decorated window. This whole inset code based on the parent window is probably completly redundant, nevertheless we keep it alive until further notice.
* | NEWT: Use accessors to read/write postion and size, allowing better trace ↵Sven Gothel2012-01-189-132/+124
| | | | | | | | | | | | | | | | | | and controlling autoPosition; Restrict more fields to private where possible. WindowImpl's position and size is made private and accessed by it's getter and setter (definePosition/defineSize). This allows better tracing of value changes and ensures autoPosition is set to false.
* | NEWT/OSX: Cleanup 'javaWindowObject' @ window-close & avoid NPE; Disable ↵Sven Gothel2012-01-184-16/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lostFocus (resignKeyWindow) when in fullscreen mode; Ignore invalid key release/type events. - Cleanup 'javaWindowObject' @ window-close & avoid NPE Ensure that the direct window.close() impl. removes the global reference and that all use cases check for NULL pointer. - Disable lostFocus (resignKeyWindow) when in fullscreen mode Similar to the X11 KDE bug, OS X delivers a lostFocus event which we prevent from being processed in fullscreen mode. - Ignore invalid key release/type events In case of offscreen/onscreen switching (fullscreen/reparenting) via destroy/create, the still pressed key would be send to the new window and repeat the action (key typed). State validation discards the double processing.
* | Newt: Add fullscreen for offscreen windows (currently OSX only); Focus ↵Sven Gothel2012-01-182-98/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling; Misc. - Add fullscreen for offscreen windows (currently OSX only), - Focus handling - requestFocus() @ creation - remove requestFocus() delay in setFullscreen() since focus loss in fullscreen mode is caused by a KDE 'misbehavior' in general. See X11Common.c FS_GRAB_KEYBOARD, an experimental focus loss prevention, disabled due to it's behavioral impact of removing the ability to use WM keyboard commands (task switcher). - Remove pending events waiting longer than TO (1200ms)
* | NEWT/OSX: Cleanup NewtMacWindow header (sort, fix and add declarations); ↵Sven Gothel2012-01-173-123/+129
| | | | | | | | Remove warning of unused var
* | NEWTWindow Focus: Skip requestFocus() if already owning focus; ↵Sven Gothel2012-01-162-4/+10
| | | | | | | | | | | | | | | | | | | | | | setFullscreen() requests focus 'later'. We shall rely on the focus state, hence we can skip 'requestFocus()' if we already own the focus. This allows a fast-path especially when called from native code (mouse click). Request focus 'later' on setFullscreen() allowing native WM to complete event handling, this is required especially on X11 to guarantee a focused fullscreen window.
* | NewtCanvasAWT: Handle 'lost' child and fullscreen case.Sven Gothel2012-01-162-31/+62
| | | | | | | | | | | | | | NewtCanvasAWT may loose it's parent role (reparenting). In such cases it shall no more handle focus events. Focus handling is also no more desired in case the child is in fullscreen mode.
* | NEWT childWindow: No autoPosition, use 0/0 as default.Sven Gothel2012-01-161-4/+10
| |
* | NEWT/OSX CALayer Animation Fix: Use '[layer removeAllAnimations]', '[layer ↵Sven Gothel2012-01-162-11/+5
| | | | | | | | removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition]' doesn't work
* | NEWT/OSX Pointer Invisible Fix: 10.6.* responder declarations & test ↵Sven Gothel2012-01-164-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | focus/isInside On OS X 10.6.8 the lack of responder method declarations (mouseEntered, ..) lead to ignore the impl. callbacks. 'isMouseInside' cannot rely on 'mouseExit'/'mouseEntered' when setMouseInvisible() is being called, deduce it manually. focusLost == mouseExit (OS X behavior), hence focusGained needs to set mouse invisible/visible in case it's requested.
* | Minor Edits: Add GL_RENDERER to JoglVersion dump; Fix typo in PMVMatrix.Sven Gothel2012-01-142-4/+6
| |
* | NEWT/OSX Performance Fix: Cache CGDisplayScreenSize() result, since it's ↵Sven Gothel2012-01-132-8/+80
| | | | | | | | | | | | | | ridiculous slow Each call to CGDisplayScreenSize() took around 6ms (5ms .. 20ms, avrg 6ms) which added up to ~2s for ~400 Screen modes.
* | 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-092-2/+10
| | | | threading (-> FIXME)
* Better unit test names for SWTSven Gothel2012-01-093-6/+6
|
* Add JOGL SWT GLCanvas unit testSven Gothel2012-01-091-0/+178
|
* minor edits / clarify SWT test descripionSven Gothel2012-01-093-5/+10
|
* 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.
* | TestAWTCardLayoutAnimatorStartStopBug532: Minor edit / Uncomment Windows ↵Sven Gothel2012-01-091-4/+4
| | | | | | | | hdc/hwnd dump.
* | WindowsJAWTWindow: unlock() invalidates the 'hdc' (surfaceHandle)Sven Gothel2012-01-091-0/+1
| |
* | 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)
* | TestAWTCardLayoutAnimatorStartStopBug532: Refine, add 'continue' mode, ..Sven Gothel2012-01-081-29/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit 098398c2a9145447da5314eed9792b3738c2d515 cleaned up and fixed context/drawable lock/unlock for makeCurrent()/release()/destroy() and consistency is looks much better now in this regard. However, on Intel HD 3000 / Windows7, our AnimatorControl start/stop still let the 2nd switch to GLCanvas within the CardPanel not showing rendering results. One interesting artefact though: 1st switch 2 GLCanvas (rendering visible): *** hdc 0x2f010ec5, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] *** hdc 0x160110c4, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] *** hdc 0x2f010ec5, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] *** hdc 0x160110c4, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] -> alternating HDC's 2nd switch 2 GLCanvas (rendering _not_ visible): *** hdc 0x160110c4, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] *** hdc 0x160110c4, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] *** hdc 0x160110c4, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] *** hdc 0x160110c4, hdw(hdc) 0x1003a0, hdw 0x1003a0 - AWT-EventQueue-0, com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1] -> fixed HDC Maybe this is a hint for what is going wrong in JAWTWindow locking, which aquires the frame's HDC. Verifying the recursive lock shows proper lock/unlock actions though.
* | GLContext/NativeSurface Impl's toString(): Add lock.toString()Sven Gothel2012-01-087-11/+20
| |
* | GLContext*/GLDrawableHelper: Fix consistency of recursive ↵Sven Gothel2012-01-089-264/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 TestAWTCardLayoutAnimatorStartStopBug532 pause/resume testSven Gothel2012-01-061-1/+4
| |
* | Added Unit-Test for Bug 532 to test Animator behavior w/ CardLayout and ↵Sven Gothel2012-01-061-0/+173
| | | | | | | | diff. Platforms