summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix: Locking/Threading; Common IntIntHashMap and Buffers; Fix: ↵Sven Gothel2010-10-091-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc .. TODO: Compile and test on MacOSX .. Fix: ===== Multithreading/Locking: See jogl/doc/Implementation/MultiThreading.txt - Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, .. and NEWT: Window/Display - No more use of JAWT global lock necessary, removed. - No need for X11 Display lock, on the contrary, this made the NV driver hang. - Use common window/surface lock - All NativeWindow surfaceLock's are recursive now glMapBuffer: If size is 0, don't do cont with the native call. glMapBufferRange: Fix capacity. glNamedBufferDataEXT: Track the size. glMapNamedBufferEXT: Manual impl. - use the tracked size glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of ignoring and implement a renamed version (*Copied), we just use ManualImplementation for the proper copy-result code. DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes in the determing loadGLJNILibrary() method, which is called by super(). Otherwise static init will overwrite them after the super() call. X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()), since this caused a freeze/SEGV sometimes. Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage. - Native: if not visible, don't focus, etc - NewtCanvasAWT: Use the container size to start with - Run the command on the EDT Using GlueGen's new DynamicLibraryBundle utility: - X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo. - X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo - Remove all path from lib names. - GL order: libGL.so.1, libGL.so, GL - shallLinkGlobal: true -> to server some 'old' DRI systems -> http://dri.sourceforge.net/doc/DRIuserguide.html - shallLookupGlobal: false - Try both : glXGetProcAddressARB and glXGetProcAddress - Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName) Found the issue with LIBGL_DRIVERS_PATH, ie if not set no valid GL instance can be found (ie ATI fglrx/DRI). This may happen if using a differen user than the desktop user for whom the env var is set within some /etc/X11/Xsession.d/ script. Enhancements: ============= GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking. GLBufferStateTracker: Use IntIntHashMap. GLStateTracker: Use IntIntHashMap. GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list), remove redundant code. FIXME: MacOSXCGLDynamicLookupHelper: - Not tested - Not using NSImage lookup anymore as recommended by OSX API Doc, so dlsym is used always (to be tested) WindowsWGLDynamicLookupHelper: - Not tested GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime, no compile time dependencies to GL anymore, nor a need to specify CgGL. Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32 while using static binding to GDI32 NEWT events generated by native code are enqueued and not send directly. This should ease locking mechanisms .. if any are necessary. NEWT: More platform specific code moved to *Impl method, simplifying the generic code of the superclass and impl protocol. Cleanup: ========= Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers Removed all InternalBufferUtil's from repository Removed GLContextImpl notion of 'optimized' surface locking, where the surface gets unlocked during makeCurrent/release. This just makes no sense and would impact multithreading in a horrible way.
* NEWT: Fix AWT Parenting ; Multithreading Issues ; Semantics: destroy(), .. ; ↵Sven Gothel2010-10-091-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Misc. Due to incapabilities of the previous AWT/NEWT reparenting the implementation and spec had to be changed to support this feature. See the first 2 comments below. - Tested on GNU/Linux (OK), Windows (a few bugs left) - TODO: - Clarify the size/layout issue, ie who is responsible etc In the test, incl AWT/NEWT, we set the size on the GLWindow and ie pack the AWT Frame. - Fix remaining [Windows] bugs .. - Fix/Implement MacOSX port .. Fix AWT/NEWT reparenting: =========================== - Now NewtFactory's createWindow() method for parenting handles NativeWindow only and is no more responsible for creating a child window upon an AWT Component. See class com.jogamp.newt.awt.NewtCanvasAWT for NEWT/AWT parenting. - New com.jogamp.newt.awt.NewtCanvasAWT, responsible for handling AWT's reparent events via addNotify/removeNotify. Reparenting is implemented via the new NEWT Window's reparentWindow() method. Also sets the background erase to false, if supported. - Fix zero size semantics in Window (setSize/setVisible) Since a zero size window is not supported by many compoenent (Windowing system, OpenGL, ..) we use the visibility methodology to not show a 0x0 window. See Javadoc. AWT components may start with zero size. - New NEWT Window: reparentWindow(NativeWindow newParent, Screen newScreen) Allowing to change the parent of a window. Similar with the fullscreen toggle, but without size/position change. Native reparenting allows to keep alive the native window while changing the container, hence it is preferred to a destroy/create cycle. To benefit from the native reparenting, a NEWT implementation has to implement 'protected boolean reparentWindowImpl(long newWindowHandle)' and return true, otherwise reparenting will be 'emulated' via the expensive destroy/create cycle. - NEWT's Window references all of it's children, if any - NEWT's Window propagates setVisible/destroy actions to it's children. - Fix NEWT's destroy() semantics. A call of destroy() or destroy(false) shall only result in the destruction of the native window (handle) nothing more. A subsequent setVisible(true) shall allow the complete recreation of the Window into a usable state. A call of destroy(true) destroys all resources the Window holds, may include Screen/Display and OpenGL resources in case of GLWindow. This is necessary to allow proper reparenting, where a native window may become destroyed, but should be recreated via setVisible(true) later on. - Fix NEWT set[Size|Position|Fullscreen|Visible] synchronization. Use a recursive lock instead of the Window instance, otherwise arbitrary Window access via AWT's EDT, NEWT's EDT or other threads can block. Also removed a use pattern like: key.lock() try { EDT.invoke(action()); } finally { key.unlock(); } Where action() itself uses the same lock object (here key), the result is a deadlock. NativeWindow Changes: ====================== - We can use XInitThreads() now (concurrent threading support) in combination with AWT. Might have been some async in our NEWT locking in regards to AWT (sync()), and the X11 Display changes made in c787f50d77e2491eb0d8201d534a6fa4885a929e. - NativeWindow's window handle is _not_ transient like surface handle, fixed documentation. JOGL Changes: ============= - New 'isRealized()' method in GLDrawable. - Misc Fixes ============ - Fix NEWT set[Size|Position|Fullscreen|Visible] duplicate code Due to pure abstract signatures, the set[Size|Position|Fullscreen|Visible] implementations of X11, OSX, .. contained duplicate code and state handling (size, pos, ..). These are now decoupled, ie generic set[Size|Position|Fullscreen|Visible] implementations calling simple set[Size|Position|Fullscreen|Visible]Impl implementations. - Fix NEWT: Renamed setAutoDrawableClient(boolean) to setHandleDestroyNotify(boolean) The semantic of setAutoDrawableClient(boolean) defaults to false was too complicated and specific, hence changed to setHandleDestroyNotify(boolean) defaults to true since its more clear and the name refers the window itself.. - Fix NEWT: Removed GLWindow's unused global window list - Fix NEWT: Remove Window's unused event mask - Rename com.jogamp.newt.impl.awt.AWTNewtFactory -> com.jogamp.newt.awt.NewtFactoryAWT
* - Fix GLProcAddressResolver regression: Use GLProcAddressResolver !Sven Gothel2010-10-091-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - X11GLXDrawableFactory: - Move shared resource creation/destruction into it's own thread - Remove the ATI hack (no XDisplay closing) for every Display, this is only necessary for the shared XDisplay and in case of AWT. - Newt - Display: Only pumpMessages if device is ready. - X11Display: Verify handle not null at DispatchMessage. - Common recursive ToolkitLock implementation, from src/nativewindow/classes/com/jogamp/nativewindow/impl/LockingNativeWindowFactory.java and src/newt/classes/com/jogamp/newt/Window.java, -> com.jogamp.nativewindow.impl.RecursiveToolkitLock - Unique XLockDisplay/XUnlockDisplay call via X11Util to simplify debugging. X11Util: Added debug code for XLockDisplay/XUnlockDisplay. Added fast LongObjectHashMap Added static lib loading and initialization. Removed active and passive list, as well as unused methods, to easy maintenance. Possible since the only 'uncloseable' Display might be the shareable one. - X11Lib: Added static initialization via X11Util Test: junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGears* - Add WindowListener for quit ..
* RunnableTask: Add attachmentSven Gothel2010-09-271-1/+18
|
* Fix my build scripts - thx 2 utgardaSven Gothel2010-09-242-2/+7
|
* Fix: In case of a sync notifyObject, the whole action must be ↵Sven Gothel2010-09-231-11/+34
| | | | synchronized/locked.
* LICENSE.txt changes:Sven Gothel2010-09-1429-457/+783
| | | | | | | | | | | | | - Added JogAmp Community and common denominator: New BSD 3-clause license - Added note to make/lib binary file (source and license) Added source and license text for external binaries used in build process (make/lib folder). Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* LICENSE.txt changes:Sven Gothel2010-09-146-0/+711
| | | | | | | | | | | | | - Added JogAmp Community and common denominator: New BSD 3-clause license - Added note to make/lib binary file (source and license) Added source and license text for external binaries used in build process (make/lib folder). Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* Simplify default value of product.build.numberSven Gothel2010-07-271-5/+1
|
* Fix: gluegen.build.number default/file value orderSven Gothel2010-07-261-2/+2
|
* Fix: Default value for gluegen.build.numberSven Gothel2010-07-261-0/+5
|
* Fix build.number -> gluegen.build.number; Read artifact.propertiesSven Gothel2010-07-261-1/+2
|
* new line after build.number in artifact.properties.Michael Bien2010-07-241-1/+1
|
* Fix build.number escapingSven Gothel2010-07-231-1/+1
|
* Add build.number -> gluegen.build.number tagging to file build/artifact.propertySven Gothel2010-07-231-1/+5
|
* Split up method call for reusageSven Gothel2010-07-231-11/+36
|
* Merge branch 'freebsd-fixes' of http://github.com/rothwell/gluegenMichael Bien2010-07-183-11/+71
|\
| * Merge branch 'master' of git://github.com/mbien/gluegen into freebsd-fixesMark Rothwell2010-06-2611-211/+337
| |\
| * | Declare x86 and amd64 compilers for FreeBSDMark Rothwell2010-06-261-4/+14
| | |
| * | New linker definitions for FreeBSD (do not reuse Linux definitions for the ↵Mark Rothwell2010-06-261-0/+8
| | | | | | | | | | | | sake of clarity)
| * | Set os.and.arch for FreeBSDMark Rothwell2010-06-261-1/+7
| | |
| * | Split FreeBSD in the same manner as Linux: isFreeBSD, isFreeBSDX86, ↵Mark Rothwell2010-06-261-2/+26
| | | | | | | | | | | | isFreeBSDAMD64
| * | Use the correct linker configurations on FreeBSD and fix the ↵Mark Rothwell2010-06-261-4/+15
| | | | | | | | | | | | java.includes.dir property.
| * | Add FreeBSD amd64 struct layoutMark Rothwell2010-06-261-0/+1
| | |
* | | Final fix for Java SE Platform query, as negotiated with Michael :)Sven Gothel2010-07-081-18/+7
| | |
* | | Merge branch 'master' of github.com:mbien/gluegenSven Gothel2010-07-074-16/+84
|\ \ \
| * | | added slice utility methods to Buffers + rudimentary test.Michael Bien2010-07-044-16/+84
| | | |
| * | | Merge branch 'master' of github.com:mbien/gluegenMichael Bien2010-06-206-93/+271
| |\ \ \ | | | |/ | | |/|
| * | | Merge branch 'master' of github.com:mbien/gluegenMichael Bien2010-06-182-18/+108
| |\ \ \
| * \ \ \ Merge branch 'master' of github.com:mbien/gluegenMichael Bien2010-06-1013-76/+550
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' of github.com:mbien/gluegenMichael Bien2010-06-055-60/+63
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' of git://github.com/sgothel/gluegenMichael Bien2010-05-231-2/+2
| |\ \ \ \ \ \
* | | | | | | | Fix: Add missing imports; Add warmup phase to primitive hashmap testSven Gothel2010-07-023-6/+22
| | | | | | | |
* | | | | | | | Moving ClassLoader parameter to the end, which seems to be easier to read.Sven Gothel2010-06-281-7/+7
| | | | | | | |
* | | | | | | | Fix regression of missing JavaSE check in case of security manager; TypoSven Gothel2010-06-261-6/+24
| |_|_|_|_|/ / |/| | | | | |
* | | | | | | another round of ProcAddressTable refactoring.Michael Bien2010-06-202-88/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - moved getAddressFor() from generated table to ProcAddressTable - added initEntry() to e.g. eagerly initialize one single entry (e.g. clGetExtensionFunctionAddress which must be available first) - several utility methods mostly usefull for debugging - cleanup
* | | | | | | added BasicProcAddressEmitterTest testing generation of ProcAddressTable and ↵Michael Bien2010-06-183-3/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | method RenameJavaMethod property.
* | | | | | | added 'intptr_t' to the list of PointerBuffer candidates.Michael Bien2010-06-181-2/+2
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | TODO consider making this configurable.
* | | | | | pass a ClassLoader to all methods which load classes. (ReflectionUtil)Michael Bien2010-06-171-18/+18
| | | | | |
* | | | | | Merge branch 'master' of github.com:sgothel/gluegenMichael Bien2010-06-161-0/+90
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | / | | |_|_|/ | |/| | |
| * | | | Adding RunnableTask, generic notifyable Runnable wrapperSven Gothel2010-06-161-0/+90
| | | | |
* | | | | small fix in IDE target. Test ran twice in debug mode.Michael Bien2010-06-101-1/+0
| | | | |
* | | | | currently no need for a (public) MiscUtils.java.Michael Bien2010-06-102-65/+6
| | | | |
* | | | | refactored Platform. Simplified initializer.Michael Bien2010-06-101-34/+42
|/ / / /
* | | | Adding DynamicLibraryBundle utility to bundle Tool and JNI native library ↵Sven Gothel2010-06-107-41/+522
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading and lookup Add JNILibLoaderBase.loadLibrary(String libname, boolean ignoreError); DynamicLibraryBundle provides Tool and JNI native library loading and lookup New classes: com.jogamp.common.os.DynamicLibraryBundle com.jogamp.common.os.DynamicLibraryBundleInfo com.jogamp.common.util.MiscUtils.java Change: DEBUG/VERBOSE properties 'gluegen' -> 'jogamp'
* | | | Minor additions to nio/Buffers, util/IntIntHashMap and os/NativeLibrarySven Gothel2010-06-057-0/+45
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffers add 'float[] getFloatArray(double[])' conversion, ready to replace all JOGL InternalBufferUtil's. NativeLibrary/DynamicLinker add global lookup method allowing Unices and OSX to lookup a symbol globally. However, this is not recommended, due to the lookup costs. Windows is not supported here. Primitive type HashMap's (IntIntHashMap): Added putAll()
* | | fixed handling of size_t which was broken since the introduction of Int64Buffer.Michael Bien2010-05-313-0/+10
| | |
* | | Refactored JavaType to use enums.Michael Bien2010-05-301-34/+30
| | |
* | | Merge branch 'master' of github.com:sgothel/gluegenMichael Bien2010-05-283-28/+25
|\ \ \ | |/ / |/| |
| * | Fix: Prepare CMethodBindingEmitter for struct methods as wellSven Gothel2010-05-252-26/+23
| |/