aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11
Commit message (Collapse)AuthorAgeFilesLines
* New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle ↵Sven Gothel2011-12-011-18/+31
| | | | | | | | | | | | | | | | | | | | | Management - Leave Platform, .. TempJarCache untouched. - GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched, for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency. - SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory - COMPLETE: additionally shutdown GLContext* Clear all cached GL/GLX proc-address and device/context mappings. - Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets - X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources. - JAWTWindow.destroy(): Close the delegated device. In case it's X11 this closes the exclusive opened X11 Display.
* GLDrawableFactory: Implementations lifecycle is handled via ↵Sven Gothel2011-12-011-33/+45
| | | | constructor/destroy()
* More Robust GLProfile Initialization ; Add NativeWindowFactory ShutdownSven Gothel2011-11-301-3/+10
| | | | | | | | | | | | More Robust GLProfile Initialization - Catch GLException in GLDrawableFactory getWasSharedContextCreated(device) impl., which may fail (See comment on Firefox/Chorme EGL deployed library for Windows). - If getWasSharedContextCreated(devide) fails, set respective factory availability to false, ie. hasDesktopGLFactory, hasEGLFactory, .. Add NativeWindowFactory Shutdown - Currenly a dummy entry, may evolve. X11Util shutdown is issued by respective GLDrawableFactory
* GLContextImpl*: createImpl() / makeCurrentImpl() refinement / robostnessSven Gothel2011-11-292-10/+3
| | | | | | | | | | | | | | | createImpl(): If successful must leave context current. makeCurrentImpl(): Is only called if context is not just created, hence the boolean parameter 'boolean newCreatedContext' is removed. This clearifies and actually cleans up the native makeContextCurrent/releaseContext call pairs. MacOSXCGLContext: CGL and NS impl. of native makeContextCurrent/releaseContext uses CGL locking to provide a thread safety. This is recommended in OS X OpenGL documentation on [shared context] multithreaded use cases. Post creation code, as seen in some pbuffer cases is moved to overriden createImpl() methods.
* Fix Bug 527: Creating a context w/ shared context, while the latter is in ↵Sven Gothel2011-11-282-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use (threading) Bug 527 describes the situation where wglShareLists() fails (throws exception) while the shared context is in use by another thread (some Animator). It was reported by Jerome Jouvie. The exception happens not everytime, but at least around 20% on manual tests I have performed on the Windows platform. The context in question are all JOGL's GL2, which natively where bound to an OpenGL 3.0 profile. The WGL_ARB_create_context spec says http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt: +++ Future versions of OpenGL may only support being added to a share group at context creation time. Specifying such a version of a context as either the <hglrc1> or <hglrc2> arguments to wglShareLists will fail. wglShareLists will return FALSE, and GetLastError will return ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB. +++ Hence the 1st patch was to remove 'wglShareLists()' usage in case we use the new WGL_ARB_create_context context creation method. Even though this is a desired change, and works in general, it didn't fix the issue. It seems that the shared context, which is passed @ new context creation, cannot be used while it is in use itself in another thread. This conclusion leads to the actual fix, ie. locking the shared context while creating the new context which shares it. Manual tests using this patch could not reproduce this issue (40 attempts). Test: TestSharedContextListNEWT2
* X11Util: Remove wrapped/locked X11Lib methodsSven Gothel2011-11-266-20/+20
| | | | | We shall lock a level above due to differentiation of XLockDisplay/RecursiveLock using X11/AWT ToolkitLock.
* SharedResourceRunner: Use generics ; X11GLXDrawableFactory.SharedRunnable ↵Sven Gothel2011-11-261-5/+9
| | | | shutdown: don't attempt to close Display device.
* GLX Information usage cleanupSven Gothel2011-11-255-180/+241
| | | | | | | - GLXUtil: Distinguish between client and server GLX information, cache client information. - GLXDrawableFactory: Utilize GLXUtil client data, as well as cache (SharedResource) GLX server data, avoiding 'uncontrolled' GLX queries, ie. w/o locking. - isMultisampleAvailable = isClientMultisampleAvailable && isServerMultisampleAvailable
* NativeWindow X11GraphicsDevice: Pass 'owner' for close-display operation @ ↵Sven Gothel2011-11-252-2/+2
| | | | constructor
* JOGL/NativeWindow: Push down JOGL's X11AWTGLXGraphicsConfigurationFactory to ↵Sven Gothel2011-11-252-195/+11
| | | | | | | | | | | | | | NativeWindow X11AWTGraphicsConfigurationFactory X11AWTGraphicsConfigurationFactory properly construct a AWTGraphicsConfiguration encapsulated a native X11GraphicsConfiguration, now available for non JOGL modules, ie NEWT. AWTGraphicsConfiguration's create() utilizes the X11AWTGraphicsConfigurationFactory via the generic factory mechanism and hence allows encapsulating a native [X11]GraphicsConfiguration. NewtCanvasAWT creates/destroys the JAWT NativeWindow on addNotify/removeNotify (reparentWindow) again. Hence the JAWTWindow is instantiated completly only, instead of utilizing updateConfiguration(..), which simplifies the mechanism.
* GraphicsConfigurationFactory: Kick off 'registerFactory' via static method ↵Sven Gothel2011-11-233-7/+11
| | | | | | instead of constructor for clarity. - prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
* NativeSurface's getGraphicsConfiguration() returns the native (delegated) ↵Sven Gothel2011-11-238-15/+15
| | | | | | | | | | | AbstractGraphicsConfiguration, if delegation is used. This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration() to NativeSurface implementations and hence reduces complexity. NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration is controlled via get/set method avoiding flawed usage (read/write), since read access shall return the delegated AbstractGraphicsConfiguration, if used.
* X11GLXDrawableFactory.createOffscreenSurfaceImpl(): Create own screen/device ↵Sven Gothel2011-11-231-8/+14
| | | | | | | instance pair Don't use the shared device due to locking issues on X11. Other platform impl. usually don't have native semantics on device/screen and may use it.
* NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-094-4/+4
| | | | | | | | | | | | conflicts with setSize() This fixes the NEWT OffscreenWindow conflict w/ setSize() which represents the action of changing the window's size. SurfaceChangeable's surfaceSizeChanged() merily notifies the actual size. JAWTWindow: Remove setSize() since it propagates the surface size upstream only. MacOSXJAWTWindow is not SurfaceChangeable complete (no surfaceSizeChanged).
* Cleanup offscreen/pbuffer drawables - minor editsSven Gothel2011-11-091-5/+4
|
* JOGL *Drawable swapBufferImpl() cleanup: Don't force swap-buffer off for ↵Sven Gothel2011-11-063-15/+5
| | | | offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
* JOGL/Offscreen-Drawable: Use setRealized(boolean) protocol for offscreen/pbufferSven Gothel2011-11-062-10/+18
| | | | This allows allowing updateHandle()/destroyHandle() to be called.
* Cleanup ; JAWT* version flag setting based whetherSven Gothel2011-11-051-2/+4
| | | | | | | | | | Cleanup - use Platform OS_TYPE - .. JAWT* version flag - if JAWTWindow is Applet, attempt offscreenLayer if avail - ..
* Minor edits / cleanup of GLContext*Sven Gothel2011-10-261-6/+2
|
* MacOSX: Pull down (and fix releaseContext) NSOPENGL/CGL mode/impl, fixes SWT ↵Sven Gothel2011-10-251-1/+1
| | | | usage and FBOMRT
* Test: NEWT Remote GLWindow w/ GL2ES1 (GLSL n/a on remote GLX, eg. NV)Sven Gothel2011-10-211-1/+1
| | | | | | | - X11GLXContext: Better error message (requested / has) - Test: - Need to fetch remote GLProfile for GLCapabilities, since local machine differs - Can't use GLSL (GL2ES2) on remote .. n/a w/ NV
* MacOSX: Always release ctx on main thread (offscreen was frozen as well); ↵Sven Gothel2011-10-131-11/+1
| | | | | | Cleanup Warnings and OSX ContextUpdater -
* Fix X11/Translucency (NV): Don't enable GLX.GLX_TRANSPARENT_TYPE; Always ↵Sven Gothel2011-09-143-31/+36
| | | | | | | | | | | | | | | | chooseConfig if translucent Don't enable GLX.GLX_TRANSPARENT_TYPE (X11) - if enabled, NV driver results in odd transparency effect (very high transparency) Always chooseConfig if translucent (X11) - recommended idx shall stay -1 if translucent, allowing our default chooser to pick up the proper config. this was previous reached due to the unavailable GLX_TRANSPARENT_TYPE request, which is now removed (see above) Allow translucency for non FBConfig, XVisual's only
* *GLContext: resetStates(); getPlatformExtensionsString(); GLX/WGL ↵Sven Gothel2011-09-092-30/+111
| | | | | | | | | | | | | | | | | | | | | | NV_swap_group support; setSwapInterval(); resetStates() - fixes a bug where X11GLXContext impl. resetState() !! - marked all with @Override tag - ensured super.resetStates() is called at end (oops) getPlatformExtensionsStringImpl()* - fixes a bug where X11GLXContext overrides GLContext cached GLX extension string query - marked 'final' in GLContext to avoid bugs - using abstract 'getPlatformExtensionsStringImpl()' called by ExtensionAvailabilityCache Add premiliry GLX/WGL NV_swap_group support - thought it might be a solution to sync swap of 2 windows - none of my drivers/platforms support it, event though extension is avail on Linux Promote setSwapInterval() (1 up) - bumped above API up to public GLContext - those extension should not spam the GL interfaces .. hmm
* Minor edits, dead code, test invocationSven Gothel2011-09-081-3/+0
|
* JOGL/X11GLXGraphicsConfiguration: Query opaque/transparent by XRender ↵Sven Gothel2011-09-031-1/+12
| | | | 'alphaMask' cfg
* Add GL Version 4.2 in GLContext Query - Add verification via ↵Sven Gothel2011-09-022-3/+3
| | | | | | | | | | glGetIntegerv(GL_MAJOR_VERSION|GL_MINOR_VERSION) Status (Using 4.2 beta driver): - Windows NV: Created and verified - Linux AMD: Creates even non existing ones, 4.2 (available) verification returns 0.0 - Linux NV: Created but verification fails, returns 0.0
* X11Util.createDisplay() -> X11Util.openDisplay(): Better name match to ↵Sven Gothel2011-08-312-3/+3
| | | | XOpenDisplay/XCloseDisplay
* X11OnscreenGLXDrawable: Mark dead GLX_WINDOW code deadSven Gothel2011-08-311-2/+4
|
* glXCreateContextAttribsARB: Use NIO for attributesSven Gothel2011-08-311-22/+27
| | | | Was intended to fix bug 515, which it doesn't. However, NIO usage is fine in this case.
* Workaround for X11/ATI fglrx bug 515 - Multiple Display ConnectionsSven Gothel2011-08-311-0/+4
| | | | https://jogamp.org/bugzilla/show_bug.cgi?id=515
* DynamicLibraryBundle*: Use generics for better spec - following gluegen ↵Sven Gothel2011-08-311-16/+14
| | | | commit cfb9e118e020707842e6b5136b07f5ab149540c1
* Cleanup: Java Generics Use and Removed Unused MethodsSven Gothel2011-08-242-7/+7
|
* Adapt to DynamicLibraryBundleInfo API change ; Remove non std EGL/ES libs ↵Sven Gothel2011-08-091-1/+1
| | | | (Android)
* GLProfile / eager init: Use relaxed query, if context was created while ↵Sven Gothel2011-08-071-0/+9
| | | | initialize shared
* GLProfile: Allow EGL besides desktop; Desktop factories restricted to ↵Sven Gothel2011-08-011-1/+1
| | | | | | | | | | desktop profiles Allow EGL besides desktop - Initialize EGL for default EGL device, even if desktop is available Desktop factories restricted to desktop profiles - Don't use native ES1/ES2 here ..
* GLContext Impl: Fix Platform 'GLX' ProcAddress Caching, allow multiple typesSven Gothel2011-08-011-3/+3
| | | | - Add platform type to key
* Enable EGL/ES1/ES2 detection/test on desktop (using mesa's libraries)Sven Gothel2011-08-011-6/+6
| | | | | Ubuntu: sudo apt-get install mesa-utils-extra libegl1-mesa libegl1-mesa-drivers libgles1-mesa libgles2-mesa
* AWT/X11 Reduce XQueryExtension 'hang' ; Impl. use XineramaIsActive() instead ↵Sven Gothel2011-08-011-9/+11
| | | | | | | | | | of XineramaQueryScreens() - Reenable creating own XDisplay for AWT components, which reduces/removes hang in subsequent XQueryExtension call (fetchScreens .. XineramaEnabled()) - Impl. use XineramaIsActive() instead of XineramaQueryScreens() Reducing memory allocation, XFree call (which was missing anyways)
* GLProfile usage getMinDesktop() -> getMinimum(); WGL/X11 GLCaps: make ↵Sven Gothel2011-07-312-4/+4
| | | | attributes final
* Fix SharedResource (SR) InitializationSven Gothel2011-07-071-19/+30
| | | | | | - Catch exceptions in SR thread avoiding deadlock in blocking caller thread - Catch NPE on SR queries to return null if appropriate
* Utilize general validation of fbcfg (further validation w/ query), refines ↵Sven Gothel2011-04-283-4/+8
| | | | f50f40e0fb2789537ecc19f8eaff439b24294a65
* Merged pull request #35 from WadeWalker/2011-04-12-fix-bug-493.Sven Gothel2011-04-271-1/+15
|\ | | | | Fix problem with external context on CentOS 5.5 inside VMWare
| * Fix problem with external context on CentOS 5.5 inside VMWareWade Walker2011-04-121-1/+15
| | | | | | | | | | | | | | | | This fixes a problem that's analogous to one we've had on Windows; apparently querying OS-specific info like hardware device contexts or framebuffer configuration IDs from external GL contexts doesn't always work properly, especially on 32-bit OSes and from within virtual machines.
* | Misc cleanup, strings etcSven Gothel2011-04-241-1/+1
| |
* | Add unified support for GL_ARB_debug_output and GL_AMD_debug_output.Sven Gothel2011-04-241-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If GL_ARB_debug_output is not available, but GL_AMD_debug_output exist, fallback to the latter, offering generic aliased methods translating the delta (AMD category <-> ARB source/type). Generic aliased methods reside in GLContext* Enable/Disable via GLContext and GLAutoDrawable. To enable the GLDebugOutput feature GLContext.enableGLDebugMessage(true) or GLContext.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG) shall be called _before_ context creation via GLContext.makeCurrent()! In case GLAutoDrawable is being used, GLAutoDrawable.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG) shall be issued before context creation via GLContext.makeCurrent()!. After context creation, the GLDebugOutput feature may be enabled or disabled at any time using this method. Verify both unit tests for usability.
* | GLContextImpl: GLContextLock -> RecursiveLockSven Gothel2011-04-231-13/+9
|/ | | | | | | | | RecursiveLock maintains a queue of waiting Threads, ensuring the longest waiting thread will be notified at unlock. Delete GLContextLock. Cleanup HashMap generics style.
* Refine getAvailableGLCapabilitiesImpl (XGL, WGL and EGL): Sort only if size > 1Sven Gothel2011-03-201-2/+2
|
* Refine WGL_PIXEL_TYPE_ARB and GLX_RENDER_TYPE:Sven Gothel2011-03-201-0/+3
| | | | | | | | | | | | | | | | | WGL_PIXEL_TYPE_ARB: Results -> GLCapabilities - WGL_TYPE_COLORINDEX_ARB not supported - Only WGL_TYPE_RGBA_FLOAT_ARB makes pbuffer float Query: - Only use WGL_FLOAT_COMPONENT_NV if supported - Remove multiple WGL_PIXEL_TYPE_ARB entry GLX_RENDER_TYPE: Results -> GLCapabilities - GLX_COLORINDEX_BIT only not supported
* JOGL GLDrawableFactory: Expose experimental method createProxySurface(..) ↵Sven Gothel2011-02-281-0/+10
| | | | | | for new windowing system ad-hoc development. WARNING: This method may change ro be removed over time!