| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 ..
|
|
|
|
|
|
| |
- added lock(); try{foo();}finally{unlock();} where missing
- made sure lock is called outside the try block
- fixed nesting in situations with two independent locks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- All available OpenGL versions (native/platform) are verified at GLProfile
initialization and can be queried ..
A mapping of major,compat -> major,minor,options is created.
- Removal of temp context creation, when creating a context.
This was necessary to query general availability of ARB_create_context.
Due to the shared context of X11GLXDrawableFactory and WindowsWGLDrawableFactory,
this is no more necessary.
Due to the version mapping, the ARB_create_context paramters are known.
- NativeWindow X11Lib: Added X11ErrorHandler, throwing a RuntimeException.
Necessary to catch BadMatch .. etc X11 errors, eg for glXCreateContextAttribsARB
Hence all X11 calls are covered now.
- X11DummyGLXDrawable needs to use an own Window, otherwise GLn n>2 fails
- Flattening the desktop GL* implementation,
all use GL4bcImpl, which reduces the footprint dramatically.
- GL*Impl.isGL*() (desktop) utilizes the GLContext.isGL*(),
hence the results reflect the actual native context version.
- GLContextImpl makeCurrent/create: Added workflow documentation,
clarified code, defined abstract methods to have a protocol.
- Removed moved files (from here to gluegen),
see gluegen a01cb3d59715a41153380f1977ec75263b762dc6
- NativeLibLoader -> <TYPE>JNILibLoader
- Fixed Exception Handling (as in gluegen bce53b52c8638729750c4286dbc04cb14329fd34),
ie removed empty catch Throwable ..
- GLContext.setSwapInterval(): Nop in offscreen case, otherwise X11IOError (NVIDIA Bug)
Test:
Tests
- Junit
- demos.gears.Gears
- demos.jrefract.JRefract
Platforms
- Linux 64/32 ATI/NVidia
- MacOsX
- Windows (virtualbox 3.1.6, offscreen failed)
TODO/BUGS:
- FIXME ATI GLn n>2 with AWT, can't make context current, works well on NVIDIA though
- FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!
- Add GL 3.3 to GL3/gl3ext.h
- Add GL 4.0 to GL3/gl3ext.h and fix the GL3/GL4 seperation
- Rename jogl.gl2.jar -> jogl.gldesktop.jar (as done with it's native lib already)
|
|
|
|
|
|
| |
exception handling in NWReflection and NativeLibLoaderBase.
goal was to prevent catch(Throwable) and to fix or document empty catch blocks where it makes sense.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- See https://bugzilla.mozilla.org/show_bug.cgi?id=486277
- Calling XCloseDisplay occasionally leads to a SIGSEGV,
even thought the reference is valid and OK.
Workaround is not to close any X11Display,
but to hold them stashed and reuse them.
Since we already pipeline all X11Display's
via Nativewindow's X11Util, an added referenceCounter
and a global active/passive list solved this problem.
This workaround is only active in case 'isVendorATI()'.
NEWT/NativeWindow X11:
- Let XIOErrorHandler and invalid display references
fail hard with FatalError, otherwise we won't see
the stack trace - and those bugs are indeed fatal.
NativeWindow X11:
- Install XIOErrorHandler, which stays active.
- X11Util.X11Display:
- Add reference counter
- Add global active/passive list.
Passive if reference count == 0
and marked as 'un-closeable' (-> ATI).
Reusing passive members when create a new display.
-
JOGL:
- Use DeleteLocalRef() calls to free temp NIO buffer
in manual *Copied implementation.
- GLDrawableFactoryImpl: Be serious about the shutdown() semantics
- *GraphicsConfiguration:
- Fix the invalid Onscreen/PBuffer/Pixmap determination (X11/EGL/WGL)
- Just return null if not valid
- X11GLXGraphicsConfigurationFactory - FBConfig
- Determine recommendedIndex properly ..
- Don't bail out if a FBConfig is invalid ..
- Use Chooser in case nothing is recommended ..
- X11OffscreenGLXDrawable fixes bugs:
- wrong (int) cast of parent window in XCreatePixmap call
- setting display to zero too early in destruction, ie
before XCloseDisplay
- X11GLXDrawableFactory is using [singleton] shared dummy resources for
- Screen, Drawable and Context
which are utilized in case they are needed ..
They are removed at shutdown call
- GLXVersion gathering in GLXUtil now ..
- DefaultGLCapabilitiesChooser: Respect PBuffer selection
Tests:
- Add DrawableFactory shutdown()
- Add various Offscreen Capabilties
- Add Offscreen and non-pbuffer case
- JUnit Passed (Linux64bit: NVidia/ATI)
- demos.jrefract.JRefract passed (Linux64bit: NVidia/ATI)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- See https://bugzilla.mozilla.org/show_bug.cgi?id=486277
- Description:
- To use PBuffer, a context must be current
- X11Display cannot be switched while using the PBuffer
[within one thread]. Hence we shall try harder to reuse
_the_ user configured X11Display - whenever possible.
This is actually a good thing, ie cleanup up our
code again.
- Changes to workaround/cleanup:
- GLDrawableFactory* methods 'canCreate*()'
are changed to 'canCreate*(AbstractGraphicsDevice)'
to allow pipelining the X11Display.
This reduces the overhead of using a local TLS X11Display.
- WindowsDummyWGLDrawable cstr gets the GLProfile as a parameter now,
this is done while adding X11DummyGLXDrawable - forseeing the
usecase to query available GLProfiles at startup.
- X11DummyGLXDrawable added, following the WindowsDummyWGLDrawable path
to have a dummy GLContext current to fix the ATI bug.
NativeWindow X11:
- Add XIOErrorHandler to identify the fatal failure
of closing a Display (-> ATI bug).
Build:
- Adding ant.jar and ant-junit.jar to the junit compile/run classpath
-
Misc:
- Fix: CreateDummyWindow(..) returns a HWND, not a HDC
- mapToRealGLFunctionName: Added mapping for X11/GLX.
- X11GLXGraphicsConfigurationFactory: Uncommented dead code 'createDefaultGraphicsConfigurationFBConfig'
Tests: Passed (Linux64bit: NVidia/ATI)
Todo: More tests on ATI, especially multithreading/X11Display usage.
|
|
|
|
| |
projectfiles.
|
| |
|
| |
|
|
|
|
| |
com.jogamp.opengl.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- JOGL GLXUtil
- JOGL X11GLXDrawableFactory
- JOGL X11GLXGraphicsConfigurationFactory
- JOGL X11OffscreenGLXDrawable
- NW X11GraphicsConfigurationFactory
NEWT Display
- Stop EDT immediatly from within EDT when destroying
-
NEWT Window
- Remove obsolete 'disposeSurfaceHandle()'
NEWT GLWindow destroy():
- Deep destruction (Window, Screen and Display) if owner,
otherwise just the GLWindow/GLDrawable
- Add 'sendDisposeEvent' flag, to allow avoiding sending
dispose to all GLEventListeners in a critical shutdown,
ie from within the browser.
NEWT EDT
- More fine grained locking
- unlocked while event dispatching
- double check locking
- Fixed cases where we are running on the EDT ..
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integrate Display.lock/unlock,
so the generic Window will call it.
Specialized for X11Display, the only real impl of it.
Fixes offscreen EDT usage ..
GLProfile:
Add isAWTAvailable() and isAWTJOGLAvailable()
TextureIO:
- Add NetPbmTextureWriter
- Only use IIOTexture* if !isAWTJOGLAvailable()
- Add write (TextureData, File)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to limitations on Windows,
we need to standardize the one thread for
- window creation, and
- event dispatching
This was already mentioned in the previous implementation
but while integrating into another threading model (Plugin3),
it turned out that manual managing the thread is too much of a burden.
NEWT now uses a EDT per Display and Thread as the default,
where Display creation, Window creation and event dispatching is 'pipelined' into.
This can be switched off:
NewtFactory.setUseEDT(boolean onoff);
and queried via:
NewtFactory.useEDT();
Note this EDT impl. does not implicate a global lock or whatsoever.
The experimantal semantics of a current GL context
for input event dispatching is removed,
i.e. the GL context is no more made current for mouse/key listener.
This reduces the complexity and allows the proper impl. of
the external dispatch via EDT .. for example.
Removed:
GLWindow: setEventHandlerMode(int) .. etc
X11Display: XLockDisplay/XUnlockDisplay
needed to be utilized to allow the new
multithreading (EDT/Render) Display usage.
X11Window: lockSurface/unlockSurface
locks X11Display as well ..
+++++
NEWT: 'getSurfaceHandle()' semantics changed.
To allow usage of the surfaceHandle for OS
where it is allocated thread local (MS-Windows),
it shall be aquired/released while lockSurface/unlockSurface.
This is done in the Windows Window implementation.
GLWindow can no more query 'getSurfaceHandle()'
to verify if 'setRealized()' was successful.
NEWT: Window surface lock is recursive and blocking now,
as it shall be.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Base all PBuffer/Offscreen GLDrawable creators on
a prev. created 'NativeWindow + SurfaceChangeable' instance.
Simplifies implementation path.
This also removes the almost cyclic referencing of
GLWindow -> OffscreenWindow
GLWindow -> Drawable -> NullWindow -> OffscreenWindow
Now it is just
GLWindow -> OffscreenWindow
GLWindow -> Drawable -> OffscreenWindow
- createGLDrawable() shall be used for all types now,
especially if you want to pass the offscreen NativeWindow
and benefit from the surfaceChangedListener etc ..
- Add public createOffscreenDrawable(..)
- EGLDrawable:
- Query surface only if not 0
- [re]create surface only if needed,
using 'ownEGL*' flag for destruction only.
|
|
|
|
| |
propagation. GLDrawableFactory.createGLDrawable() propagates NativeWindow to offscreen NullWindow.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- If property 'nativewindow.ws.name' is set,
use it as the custom windowing type returned by
getNativeWindowType(true)
NEWT:
- Using NativeWindowFactory's property 'nativewindow.ws.name'
as a package name for custom NEWT windowing imlementations,
ie:
-Dnativewindow.ws.name=com.sun.javafx.newt.intel.gdl
-Dnativewindow.ws.name=com.sun.javafx.newt.broadcom.egl
This allows far more flexibility to add custom impl.
- Add Intel-GDL, define property 'useIntelGDL'
to build the native part.
Intel GDL is impl in the package 'com.sun.javafx.newt.intel.gdl'
JOGL:
- All impl. of 'createGLDrawable(..)', which were actually creating
onscreen drawable only, were renamed to 'createOnscreenDrawable(..)'.
- GLDrawableFactoryImpl impl. 'createGLDrawable(..)' now
and dispatches to the actual create* methods in respect to
the Capabilities, ie onscreen, pbuffer and offscreen.
- GLDrawableFactory:
- If using a native ES profile -> EGLDrawableFactory
- If existing native OS factory -> Use that ..
- Else -> Use EGLDrawableFactory, if available
|
| |
|
|
|
|
| |
NativeWindow instance
|
| |
|
|
|
|
| |
surfaceUpdated(); BroadcomEGL: Use custom surfaceSwap(); GLDrawableImpl's: Utilize NativeWindow's surfaceSwap() and surfaceUpdated(); Fix common enum of GL2ES1 and GL2GL3, merge them in GL
|
|
|
|
| |
non native OS factory is available
|
| |
|
| |
|
|
|
|
| |
(-Dnativewindow.ws.name=BroadcomEGL): 1st Draft of supporting broadcom's proprietary EGL mapping
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Clean up X11 dependency
- NativeWindow:
- Seperate X11 out of core.
- Add nativewindow.x11.jar and nativewindow.x11.cdc.jar
- Newt:
- Seperate X11,win,osx out of core.
- Add newt.x11.jar, newt.win.jar, newt.osx.jar and the CDC variants
Fix: External Context & Drawable (X11 and Windows)
- Properly fetch current context values (ctx, display, drawable, ..)
- Create GraphicsConfiguration based on the given pixelformat/FBConfig
Fix: Java2D OpenGL Usage
- Using the external context as shared for the external drawable
- JAWTUtil: Skip locking in case of OGL-Flush-Queue
- TODO: Windows FBO still does not work .. (X11 is fine)
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2022 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
| |
X11AWTGLXGraphicsConfigurationFactory: Encapsule whole block in lock/unlock to minimize context switch
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2021 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2020 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2018 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
| |
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2016 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Cg classes reside in jogl.cg.jar
- Restrict native Cg library dependency only to the jogl cg library,
which is loaded from the CgGL class only.
- Tested Cg demos with and w/o Cg installation,
tested regular GL demos with and w/o Cg installation.
(Linux & MacOSX)
- jogl/etc/profile.jogl
- Changed invocation: $0 <JOGL-PROFILE> [jogl-build-dir]
- Autodetects if used from within a autobuild directory
- Added it to the autobuild zip file
- Fixed: NativeWindow X11GraphicsScreen, adding missing Toolkit locks
- Set RI to true !
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2009 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Multithreading / Locking ..
It turns out that there exist platforms with a
buggy thread safe OpenGL/GLX/.. implementation.
E.g. Linux x86_64, NV 185.18.14 where 1/6 attempts
of the test case
java -Djava.awt.headless=true demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
will result in:
C [libGL.so.1+0x5c08a] glXGetFBConfigAttrib+0x40a
[error occurred during error reporting (printing native stack), id 0xb]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.opengl.impl.x11.glx.GLX.glXGetFBConfigAttrib1(JJILjava/lang/Object;I)I+0
j com.sun.opengl.impl.x11.glx.GLX.glXGetFBConfigAttrib(JJI[II)I+67
j com.sun.opengl.impl.x11.glx.X11GLXGraphicsConfiguration.glXGetFBConfig(JJI[II)I+24
In these cases, you can set the system property
nativewindow.locking=true
to always use the generic reentrance capable
LockingNativeWindowFactory implementation as a last resort.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1992 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
| |
once; don't remember the JVM static initialization rules which
probably define why it was getting called twice
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1989 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current thread default display or
the given display is being used,
hence it is no more required to use a ToolkitLock
for X11 without AWT.
Removed X11 ToolkitLock in case of X11 without AWT,
which is being detected with the absence of the classes
java.awt.Component _AND_ javax.media.nativewindow.awt.AWTGraphicsDevice
or with the system property
java.awt.headless=true
Only in the Java2D/Swing case, one 'leaking' Display
is created within canCreateGLPbuffer().
- Workaround for Hotsport bugs #4395095, #6852404
4395095 JNI access to java.nio DirectBuffer constructor/accessor
6852404 Race condition in JNI Direct Buffer access and creation routines
- Added build.xml
-Dbuild.noarchives=true property to skip the time consuming
creation of zip archives.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1988 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that under some circumstances,
e.g. >3 threads within initialization time,
the static X11Display usage result in a
native deadlock within glXQueryServerString().
The call never returned. May be
This happend even with NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
Removed X11Util.getStaticDefaultDisplay()
This allows us to remove the ToolkitLock around
these segments, due to a thread local X11Display utilization.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1977 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add: NEWT pumpMessages/dispatchMessages
- Handled by the Display implementation for all windows
- Windows .. OK
- MacOSX .. OK
- X11 .. OK
- Added Atom Property handling to attach java window object to window
- Removed the eventMask for dispatching messages,
since dispatching is for all windows now.
(Wasn't impl. for all platforms anyways)
- All init static code will funnel in the Display.initSingletion(),
to ensure a proper init order for all platforms.
- Display creation is unique for (name,thread).
Handling a TLS mapping of display-names to Displays.
- GLWindow: autoSwapBufferMode and eventHandlerMode are static members
- Tested with experimental tagged
GLWindow.setRunPumpMessages()/runCurrentThreadPumpMessage(),
1 thread - 4 windows, etc ..
java demos.es2.RedSquare -1thread -onepump -GL2 -GL2 -GL2 -GL2
No benefit ..
However .. the implementation is more correct now,
due to the display/current-thread message pumping.
- Fix: Window.sendMouseEvent() bounds check
- Fix: MacWindow has proper nsView locking now,
local to the window instance. locked in lockSurface
besides general window manipulation.
- Fix: JAWT utilized JAWTUtil.init() to
init libraries - NativeLibLoaderBase.loadNativeWindow("awt")
call was missing. (Visible on MacOSX + AWT)
- Fix: GLXUtil proper locking
- Fix: X11Util proper locking
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1976 232f8b59-042b-4e1e-8c03-345bb8c30851
|
|
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
|