summaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
* The 'shared resource' thread must be a deamon, otherwise the application ↵Sven Gothel2010-11-091-1/+3
| | | | won't exit
* Adding simple static main test entry to provide standalone autobuild ↵Sven Gothel2010-11-092-0/+57
| | | | verification
* Reformated license tag; Added Khronos licenseSven Gothel2010-11-081-29/+27
|
* Fix imports ..Sven Gothel2010-11-077-32/+82
|
* Fix NativeSignatureJavaMethodBindingEmitter usage; Fix importsSven Gothel2010-11-071-11/+9
|
* Gluegen parts in src/gluegen (clean)Sven Gothel2010-11-0710-0/+3550
| | | | | | | - Adding gluegen-gl.jar for GlueGen GL compile time parts. - Removed dead build-gluegen.xml - Adding com/jogamp/gluegen/runtime/opengl/* to jogl core - Moved gluegen gl part to jogl/classes
* Fix buffer size: 64bit GLBufferSizeTracker, hash over addr+size, save ↵Sven Gothel2010-11-062-11/+158
| | | | | | | | | | fail-fast hash cache, .. Relates to GlueGen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7, branch sgothel_wip_fixes01. Memory object size is ptrdiff_t, hence long (64bit). The hash value must include size as well, otherwise boundaries cannot be verified. (security) Double check hash collisions while adding a new MemoryObject.
* Added missing JogAmp copyrightSven Gothel2010-11-065-3/+84
|
* Complete 1be7b5271ec1d08b6929a88dd811754d33d149de, EGL_KHR_fence_sync ..Sven Gothel2010-11-061-3/+3
|
* Added fast path to equals impl.Sven Gothel2010-11-063-3/+34
|
* Complete removal of NV KD and OMX started with ↵Sven Gothel2010-11-062-26/+45
| | | | | | | | 46f17013c7cd59d551371edb2c1a4a57f8cbd84f (code dependencies) This currently removes KD fullscreen for NV devices and the whole OMX NV stream/file type detection, which renders the OMX hack useless. However, updated EGL sync (NV proprietary) to EGL_KHR_reusable_sync and EGL_KHR_fence_sync.
* JOGL/X11: Decorate glxMakeContextCurrent calls from ↵Sven Gothel2010-11-041-10/+20
| | | | makeCurrentImpl/releaseImpl with X11 Error Handle
* JOGL/X11: Fix context scanning, misc simplifications ..Sven Gothel2010-11-036-93/+83
| | | | | | | | | | | | | | | | | | | Fix context scanning --------------------- Ie on 3.0 NVidia systems, trying to create a 4.1 context leads to a BadAlloc X11 error. A prev patch disabled the X11 error handler, to reduce sideeffects. In case AWT is not being used, the BadAlloc isn't catched and the JVM freezes within the native function call. Decorating context scanning with NativeWindow's 'setX11ErrorHandler' solves this issue. Simplifications ----------------- X11: always try a direct context. If this is not possible due to the display connection, an indirect is being used anyways. Hence 'createContext(boolean direct)' -> 'createImpl()'. X11/WGL: Simplify the context creation logic a bit.
* JOGL GLContextImpl: Trigger ProcAddressTable mapping via ↵Sven Gothel2010-11-031-8/+13
| | | | | | 'setGLFunctionAvailability' call while scanning all available context. .. also reorder context scanning from low -> high
* JOGL DrawableFactory/AWT: Only use AWT factory if AWT is enabledSven Gothel2010-11-033-25/+30
| | | | .. and a little cleanup in the X11 SharedResourceRunner
* Minor cleanup: strings, unused vars, ..Sven Gothel2010-11-022-5/+5
| | | | | | | | | | DEBUG strings w/ thread name nativewindow.TraceLock -> nativewindow.debug.ToolkitLock.TraceLock Sync Xmisc (DummyWindow) with NEWT's creation test scripts: awt and non-awt usage
* JOGL: HashMap ProcAddressTable for all GL profiles incl GLX/WGL/CGL/EGLSven Gothel2010-10-299-85/+165
| | | | | | | Reduce (performance/footprint) overhead of ProcAddressTable recreation, instead use a hashmap (major, minor, profile) -> ProcAddressTable. Remove GL2ES12 implementation profile, redundant.
* Proper X11 Display ClosingSven Gothel2010-10-294-47/+73
| | | | | | | | | | | | | | | | | | | | | X11Util: Removed TLS semantics, since TLS name -> dpy mapping is erroneous at this point. Added lists for open connections (for optional later shutdown). AbstractGraphicsDevice interface and implementations: Adding 'close()' method allowing native implementations the ability to close the native resource, ie X11GraphicsDevice. This becomes necessary for 'on the fly' created X11 Display connections, ie in X11AWTGLXGraphicsConfigurationFactory, which enables closing. Utilize 'close' call in use cases: GLCanvas, GLJPanel and AWTCanvas. Remove active X11 Display creation in X11JAWTWindow, as a last resort, use the X11SunJDKReflection method. Used for reference only, not active rendering etc, mostly for on the fly AWT parenting in NewtFactoryAWT. However, these 'on the fly' references are erroneous and should be remodelled, ie passice and active X11GraphicsDevice's ..
* Promoted the shutdown hook from GLDrawableFactoryImpl to GLProfile.Sven Gothel2010-10-298-225/+337
| | | | | Each GLDrawableFactory implementation provides a shutdownInstance() method, issued by GLProfile.
* ThreadingImpl: AWT semantic cleanup.Sven Gothel2010-10-292-24/+25
| | | | | | Use GLProfile's AWT available status. If mode == AWT, then the AWTThreadingPlugin must be available, else throw exception. Made AWTThreadingPlugin's 'isOpenGLThread' compatible with 'invokeOnOpenGLThread'.
* Animator Fix/CleanupSven Gothel2010-10-285-47/+76
| | | | | | | | | | | | | | | | | | | | | | - Fix AnimatorBase: Finally using 'com.jogamp.opengl.util.AWTAnimatorImpl', wrong FQN lead to never use it, hence deadlock in case of AWT usage (AWT-EDT). - Animator - remove volatile for synced state isAnimated - new state isPaused, since shouldPause give the wrong answer for isPaused() - Cleanup wait condition for lifecycle tasks (start/stop/pause/resume) - 'AnimatorImpl' -> 'DefaultAnimatorImpl implements AnimatorBase.AnimatorImpl' - 'AWTAnimatorImpl implements AnimatorBase.AnimatorImpl', hence no derivation of a complete overwritten AnimatorImpl needed. - GLWindow.destroyActionPreLock() - Stop animator if unrecoverable, else pause only. Tests: - No explicit animator stop, hence tests implicit stop/pause by GLDrawableHelper and/or GLWindow.
* WindowImpl/GLWindow LifecycleHook:Sven Gothel2010-10-273-9/+63
| | | | | | | | | | | - 'destroyAction' -> 'destroyActionPreLock' 'destroyActionInLock', to be able to stop animation before locking. GLDrawableHelper.invokeGL() dispose case (initAction == null): - pause animator if animating before makeCurrent (locking) GLCanvas/GLJPanel dispose: recreate case - resume animator if was animating
* GLAnimatorControl/Animator: Allow stop() if paused()Sven Gothel2010-10-272-11/+7
|
* Minor: fix imports, JAWTUtil: query headless 1st (faster), ↵Sven Gothel2010-10-271-1/+0
| | | | NativeWindowFactory added nonAWT ToolkitLock create method
* Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6; Misc ..Sven Gothel2010-10-262-21/+21
| | | | | | | | | | | Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6 - Workaround in TestGLWindows01NEWT: same create/destroy order - Prove bug with simple native test app: jogl/test/native/displayMultiple02.c Misc: - Reverted d52181032830acdd5e4069a41ccd0daff5922d8a, ie reenable x11IOErrorHandler (nativewindow) - GLDrawableHelper: methods -> final - X11Util.NamedDisplay: remove unused RecursiveLock, Cloneable
* can't enable x11IOErrorHandler without disableSven Gothel2010-10-261-1/+9
|
* X11Util: lock toolkit/x11 unificationSven Gothel2010-10-261-32/+28
|
* JOGL: Reenable Applet/Webstart/RCP support for JOGL + AWT + X11Sven Gothel2010-10-1434-254/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed GLProfile/NativeWindowFactory/.. initialization methodology: GLProfile: public static synchronized void initSingleton(final boolean firstUIActionOnProcess); NativeWindowFactory: public static synchronized void initSingleton(final boolean firstUIActionOnProcess); +++ Introducing NativeWindow ToolkitLock, implementations are NullToolkitLock JAWTToolkitLock X11JAWTToolkitLock X11ToolkitLock AbstractGraphicsDevice provides generic global toolkit locking methods, implemented by the ToolkitLock interface. ToolkitLock's are aggregated in NativeWindow's DefaultGraphicsDevice to implement it's superclass lock()/unlock() methods. This enables a device specific locking strategy, ie on X11/AWT utilizing JAWT && X11 locking, and maybe none for others (NEWT). No locking is required for X11 / AWT, in case the above mentioned initialization happened as a 'firstUIActionOnProcess'. The ToolkitLock factory is currently a hardcoded part of NativeWindowFactory. We may have to allow 3rd party NativeWindow implementations to register custom ones. +++ com.jogamp.opengl.impl.GLDrawableImpl cleanup: Dealing with all locking code, providing all public methods. Exceptions are commented. Specializations x11/windows/.. only contains platform code. Pulled down access qualifiers if possible public -> protected. com.jogamp.nativewindow.impl.x11.X11Util Wrapping all X11Lib method with the new locking code. com.jogamp.nativewindow.impl.jawt.JAWTUtil Utilize global SunToolkit.awtLock() is available, the fallback to global JAWT.lock(). The latter just invokes the first. javax.media.nativewindow.awt.AWTGraphicsDevice setHandle(long handle) -> setSubType(String type, long handle) which also resets the ToolkitLock respecting the new type. This ensures correct locking after the sub type has been determined, ie AWT using an X11 peer. +++ Misc Changes done on the way .. GLCanvas: Fixed inversed this.drawableHelper.isExternalAnimatorAnimating() condition, which disabled normal repaint. GLJPanel: Removed drawableHelper.isExternalAnimatorAnimating() condition, which disabled painting, since the animation thread just updates the source image. NEWT WindowImpl: When reparenting back to parent and 'refit' child if it's size exceeds it's parent. More 'Fix: Memory consumption' commit 6ced17f0325d5719e992b246ffd156e5b39694b4. NEWTEvent: Removed code to evaluate the 'system event' attribute, need to find a better approach.
* Add version info tool, to allow more precise bug reportsSven Gothel2010-10-141-0/+135
|
* Fix: Memory consumptionSven Gothel2010-10-145-64/+113
| | | | | | | | | | | | | | | | Observing memory consumption showed: 1 - 'traceLock' debug stack traces (GLContextLock) 2 - massive Iterator usage (1) is fixed, ie only enabled in DEBUG mode, like we have done in RecursiveLock before (2) Using an Iterator on ArrayLists with a low element count < 100, as it is usual in our use cases, is observed not to be faster than accessing the elements via an index (-> TestIteratorIndexCORE.java ). On the contrary, the index implementation was a bit faster. Further more, these Iterators were massively used on the fly during animation, hence their memory managment even impacts fluent processing/animation. Recoded all animation related (display, surfaceUpdated, ..) loops using an index.
* Fix: Avoid list modification while iterator in use ↵Sven Gothel2010-10-141-19/+24
| | | | (ConcurrentModificationException) - 2 - Use volatile barrier
* Fix: Avoid list modification while iterator in use ↵Sven Gothel2010-10-141-12/+34
| | | | (ConcurrentModificationException)
* Harmonize all runtime properties, see doc/Implementation/runtime-properties.txtSven Gothel2010-10-1110-12/+13
|
* JOGL: WindowsWGLDrawableFactory/X11GLXDrawableFactory: synchronize ↵Sven Gothel2010-10-093-79/+80
| | | | | | | sharedContext lock/release Unsynchronized lead to an 'context already locked by another thread' exception at initialization time (Windows: in general; X11: ATI and pbuffer drawable).
* Relocated RecursiveToolkitLock -> gluegen ; NEWT AWTParentWindowAdapter fix ↵Sven Gothel2010-10-092-5/+16
| | | | | | | | | | | | | | | | | | & WindowImpl debug change ; Add NEWT/AWT unit test 1 frame - 2 NewtCanvasAWT Relocated RecursiveToolkitLock -> gluegen com.jogamp.nativewindow.impl.RecursiveToolkitLock -> com.jogamp.common.util.RecursiveToolkitLock NEWT AWTParentWindowAdapter fix - minimize action if status unchanged - added missing isValid() condition before runOnEDT.. NEWT WindowImpl: - debug output only if action triggered (resize/visible) Add NEWT/AWT unit test 1 frame - 2 NewtCanvasAWT - Testing case where AWTParentWindowAdapter provokes both GLWindow instances to resize/visible
* Fix: JOGL GLContextLock starvation; Tighten NEWT/AWT focus unit testsSven Gothel2010-10-081-32/+43
| | | | | | | | | | Fix: JOGL GLContextLock starvation - Apply changes made in RecursiveToolkitLock (c8a9c59e4838cd43090378a7ed60544449472801), ie notifyAll() -> notify(), plus sync (flow/mem) usage. Fix: Tighten NEWT/AWT focus unit tests - AWTRobotUtil.requestFocusAndWait() waits for EventCountAdapter gain and lost focus as well. - In case of NewtCanvasAWT, additionally wait for it's lost focus
* NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit testSven Gothel2010-10-0655-308/+404
| | | | | | | | | | | | | | | | | | | | | | | | | NativeWindow/NativeSurface Refactoring - Using NativeSurface interface - NativeWindow extends NativeSurface, adds getLocationOnScreen(Point) - NativeWindow add: getParent() - NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must. - NullWindow -> ProxySurface impl NativeSurface - JOGL: Uses NativeSurface only. - GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface() Added mouseClick NEWT/AWT unit test JOGL: - GLAnimatorControl add: resetCounter() - NEWT: - GLWindow counters: return GLWindow counters always - WindowImpl - requestFocus() wait until done - reparent: readded requestFocusImpl(true), native impl skips java focusAction if reparented - X11Window: Add XRaiseWindow() in requestFocus()
* Unit test for Bug 411 (Pre AWT/Swing Usage, Mixed usage with JOGL) - ↵Sven Gothel2010-09-251-18/+21
| | | | | | | | | | | | | GLCanvas NPE fix - NewtCanvasAWT added destroy(..) Unit test for Bug 411 (Pre AWT/Swing Usage, Mixed usage with JOGL): Added exhausting Pre AWT/Swing usage test utilizing a later JOGL init with GLCanvas and NEWTCanvasAWT. This works for NV+X11+Ubuntu+64bit, have to do more testing. GLCanvas NPE fix at destroy/dispose, check if already destroyed, ie context==null NewtCanvasAWT: Add destroy() and destroy(boolean unrecoverable)
* NEWT: Animator API Change - Changed Lifecycle of Display/Screen (part 4)Sven Gothel2010-09-2313-292/+731
| | | | | | | | | | | | | | | | | | | | | Change GLAutoDrawable interface: setAnimator(Thread) -> setAnimator(GLAnimatorControl) to minimize the setAnimator(..) calls and to allow fine grained control over the animation, ie in case of reparenting where the animation shall pause while changing the window(s). Introducing GLAnimatorControl interface: - abstract class AnimatorBase implements GLAnimatorControl - class Animator extends AnimatorBase - class FPSAnimator extends AnimatorBase This also changes FPSAnimator, since it is no more derived from Animator, use it's superclass or superinterface instead. +++ - Fix GLJPanel.paintComponent(): Don't issue reshape/display in case an external animator thread is animating. - Fix: Documentation [API]
* Misc CleanupsSven Gothel2010-09-158-38/+16
| | | | | | | | - www/index.html: absolute local refs -> relative - Platform GLContextImpl specialisations: remove local overriding drawable instance - X11ExternalGLXDrawable: Remove dead code, left over.
* Merge branch 'master' of github.com:mbien/joglSven Gothel2010-09-1517-118/+71
|\
| * Merge branch 'master' of git://github.com/sgothel/joglMichael Bien2010-09-101-10/+10
| |\
| * | trivial code cleanup in glx package.Michael Bien2010-09-0917-118/+71
| | | | | | | | | | | | | | | | | | | | | - locks are final - debug prints use System.err exclusively (to prevent message corruption) - removed unused imports, unused variables - code cleanup in some places
* | | Removed COPYRIGHT.txt file, whichSven Gothel2010-09-1414-350/+361
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is redundant due to COPYRIGHT notice in LICENSE.txt. It's product usage terms are no more applicable, since our repository is not used by Sun Microsystems to deliver a product. LICENSE.txt changes: - Updated SGI FreeB license reference from 1.1 to 2.0 - Dropped Sun alternative license, which is redundant due to the FreeB 2.0 license. - Added JogAmp Community and common denominator: New BSD 3-clause license README: - Added contacts - Sun -> JogAmp - Added Michael Bien Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* | NEWT: Focus Fix + CleanupSven Gothel2010-09-031-10/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Issueing 'requestFocus' via the native EDT dispatch loop may cause a deadlock, due to a possible implicite AWT requestFocus call (NewtCanvasAWT). Approach: RequestFocus issued directly, by Window.requestFocus() and the native EDT dispatch loop, is queued for later execution by EDT. This shall decouple a possible native windowing TK resource collision. - X11Windows.c: Add missing 'reparented' param for requestFocus to force requestFocus after reparenting. - AWTWindow.java: Add requestFocusImpl() +++ NEWT: Cleanup - Remove Event Type Bits in: - EventListener.h - NEWTEventListener.java - Remove InputEvent 'consume' status -
* minor formattingSven Gothel2010-08-241-2/+1
|
* Add OpenGL 3.3, 4.0 and 4.1 language mapping.Sven Gothel2010-08-242-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update header: - GL/glext.h to khronos 2010-08-03 - GL3/gl3.h to khronos 2010-08-03 - Move platform code to GL/glplatform.h GL3/glplatform.h - Unify 64bit typedefs: gl-64bit-types.h - Move GL 3.[123] and 4.[01] complete subsumed extension enums and functions into their extension spec and just reference them. This ensures proper extension availability via lower OpenGL profiles, hence a proper GL2GL3 interface. - GL3/GL4 cleanup: - make-glextension-depignore.sh: determine required GL version for extensions for proper positioning, ie GL2GL3 or GL3 or GL4 via gluegen IgnoreExtension commands. - use ARB_ES2_compatibility for common GL2ES2 methods, if available - consolidated gl2-gl4 subsumed extension to gl-common.cfg - Missing GL3/GL4 Functions: glMultiDrawElementsBaseVertex glDebugMessageCallbackARB glDebugMessageCallbackAMD - TODO (new feature integration): - ARB_ES2_compatibility / ARB_get_program_binary for com/jogamp/opengl/util/glsl, ie - store binaries com/jogamp/opengl/util/glsl/sdk/CompileShader* - query supported binary formats (enums ?) - optional prio binaries - ARB_ES2_compatibility, if available GLES2/GL2ES12 would be available - ARB_separate_shader_objects for com/jogamp/opengl/util/glsl, ie - swizzle vertex/fragment shader in programs - ..
* Fix file modesSven Gothel2010-07-07129-0/+0
|
* GLAutoDrawable: setAnimator/getAnimator/invoke/display changes; NEWT: Adding ↵Sven Gothel2010-07-075-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | native repaint; Fix reparent/fullscreen New: NEWT Native Repaint ========================= Support for native repaint, which shall call display() in case no animator is running. GLAutoDrawable invoke(GLRunnable) impl. handles case if invoked on animator thread, or no animator thread is running (issueing a display() call). The impl resides in GLDrawableHelper. The Animator un-/registers itself at the GLAutoDrawable via setAnimator. New: NEWT AWT/NEWT Parenting Focus Handling ============================================ Introducing Window.FocusRunnable, to be registered at the NEWT Window, which will be executed before the native focus claim. Window.FocusRunnable's run method returns a boolean, which determines whether the native implementation shall proceed claiming the native focus. This API focus hook is necessary to allow an optional underlying windowing toolkit, ie AWT (see usage NewtCanvasAWT), to make the focus traversal transparent. Fix: GLEventListener / GLDrawableHelper ======================================== GLEventListener's init() and glViewport()/reshape() method must be called before the 1st display() and after a dispose() call. It could miss the 1st display() call if added after the setVisible(true) call - due to the native repainting. The impl resides in GLDrawableHelper. Fix: Misc NEWT ============== Window reparent issues a resize() and display() call, if it is visible. native Window uses direct send.*Event for input events (again), instead of enqueueing it for performance. Window impl all status change native event Java callbacks, instead of having duplicated code in all implementations. Fullscreen, reposition at zero. Reparent/Fullscreen repaint if visible. Native reparent/fullscreen, fix glitches on Windows (visibility while reparenting)
* Merge branch 'master' of github.com:sgothel/joglSven Gothel2010-06-268-15/+19
|\