aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl
Commit message (Collapse)AuthorAgeFilesLines
* OpenGL ES/EGL OverhaulSven Gothel2012-02-137-40/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* GLDynamicLibraryBundleInfo: Remove 'nativewindow_x11' preload lib ↵Sven Gothel2012-01-231-1/+0
| | | | (implicitly loaded by NativeWindowFactory)
* GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) ↵Sven Gothel2011-12-171-1/+0
| | | | | | | | | | | | | | @ creation GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) @ creation, following deferred creation like onscreen drawables. This allows using offscreen drawables in classes like GLCanvas, where realization is deferred due to pending valid size. Only createGLPBuffer() realizes the offscreen pbuffer drawable immediatly to reduce the impact on user-code. GLDrawableFactoryImpl.createGLDrawable(): - Simplify OffscreenLayerSurface validation and check it first regardless of the chosenCaps to get a chance to use pbuffer.
* setGLFunctionAvailability(..): Reduce the calls to resetProcAddressTable() ↵Sven Gothel2011-12-132-2/+2
| | | | | | | | | | | 12 -> 7 in initialization. Reducing the calls to resetProcAddressTable() 12 -> 7 in initialization, saves: Linux/AMD: 600ms -> 300ms Linux/NV: 161ms -> 112ms OSX 10.7/NV: 522ms -> 397ms Still some freezes on OSX 10.6.8/NV .. further analysis is going on.
* Fix concurrency bug of GLProfile initialization ; Fix SharedResourceRunner ↵Sven Gothel2011-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dead' thread (Applets) GLDrawableFactory: - clarify: public getWasSharedContextCreated(..) -> protected createSharedResource(..) - add: getSharesResourceThread() GLProfile: - proper locking of initSingletion(..) path: - Use RecursiveThreadGroupLock and add/remove GLDrawableFactory's sharesResourceThread while creating it's the sharedResource. This simplifies and fixes GLProfile's locking code. - Fix and simplify initSingleton(boolean) API doc - mark it deprecated. - Add initSingleton() for controlled initialization only, pairing w/ shutdown(..) Remove initSingleton(boolean) calls in code and test! +++ Fix SharedResourceRunner 'dead' thread (Applets) In Applets, stopping an Applet makes the browser Java plugin interrupting and killing all related threads, including our SharedResourceRunner thread. - Validate whether the shared resource thread is alive - Catch interruption in shared resource thread and assume it's a kill signal - releaseSharedResource: clear devicesTried set
* New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle ↵Sven Gothel2011-12-011-31/+46
| | | | | | | | | | | | | | | | | | | | | 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.
* Minor edits.Sven Gothel2011-12-013-15/+0
|
* GLDrawableFactory: Implementations lifecycle is handled via ↵Sven Gothel2011-12-011-11/+26
| | | | 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-2/+2
| | | | | | | | | | | | | | | 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-281-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* GraphicsConfigurationFactory: Kick off 'registerFactory' via static method ↵Sven Gothel2011-11-232-3/+5
| | | | | | instead of constructor for clarity. - prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
* NativeSurface's getGraphicsConfiguration() returns the native (delegated) ↵Sven Gothel2011-11-234-4/+4
| | | | | | | | | | | 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.
* Nativewindow: Introduce API private MutableGraphicsConfigurationSven Gothel2011-11-121-5/+15
| | | | | MutableGraphicsConfiguration allows derivations to set the chosen capabilities, hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
* NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-091-1/+1
| | | | | | | | | | | | 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-21/+13
|
* JOGL *Drawable swapBufferImpl() cleanup: Don't force swap-buffer off for ↵Sven Gothel2011-11-063-16/+10
| | | | offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
* Minor edits / cleanup of GLContext*Sven Gothel2011-10-263-10/+7
|
* Generalize sample extension in GLCapabilities*, currently NV_coverage_sample ↵Sven Gothel2011-10-082-24/+20
| | | | is respected in EGL
* EGL: Fall back to NV_coverage_sample if EGL MSAA/FSAA is n/aSven Gothel2011-10-082-0/+16
|
* EGL: In case a nativeVisualID is given to match, but none visual IDs are ↵Sven Gothel2011-10-061-2/+8
| | | | | | available, ignore the given ID Fixes Omap3 EGLConfig's which does not have a native visual ID
* Android/EGL: dump all caps, write-back formatSven Gothel2011-10-011-0/+3
|
* EGL: eglSwapBuffers() show failure in DEBUG modeSven Gothel2011-09-301-1/+6
|
* ES Library lookup order - Favor spec lib nameSven Gothel2011-09-302-11/+17
|
* EGL: chooseGraphicsConfigurationStatic() public and w/ optional visualIDSven Gothel2011-09-302-14/+35
|
* NEWT/JOGL: MacOSX UpdateSven Gothel2011-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature related: - Added always-on-top - Added translucency - Child Window Position - AWT parent: manual traverse up the tree and calc position on screen (Problem: the parent view rect is not at the proper position, but covers the whole frame) EDTUtil related: - Works now w/ AWT ot headless (again) - OSX native JNI callbacks gathering JNIEnv properly and attaches/detaches thread. - AWT case: using AWT-Event which properly dispatches our cocoa events - MainThread (headless) case: Fork off thread w/ main class and kick off NSApp run(). This leads to same behavior as w/ AWT case. - Using DefaultEDTUtil - Cleanup MainThread (implements EDTUtil) - Currently not used as EDTUtil (osx), just as launcher - Removed EDTUtil impl code, reuse DefaultEDTUtil - Cleanup AWTEDTUtil (implements EDTUtil) - Currently not used as EDTUtil (osx)
* *GLContext: resetStates(); getPlatformExtensionsString(); GLX/WGL ↵Sven Gothel2011-09-091-10/+19
| | | | | | | | | | | | | | | | | | | | | | 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
* Add GL Version 4.2 in GLContext Query - Add verification via ↵Sven Gothel2011-09-022-2/+2
| | | | | | | | | | 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
* DynamicLibraryBundle*: Use generics for better spec - following gluegen ↵Sven Gothel2011-08-313-49/+56
| | | | commit cfb9e118e020707842e6b5136b07f5ab149540c1
* Cleanup: Java Generics Use and Removed Unused MethodsSven Gothel2011-08-242-2/+2
|
* Also tackles bug 510, only lookup global on Android. See gluegen commit ↵Sven Gothel2011-08-221-2/+9
| | | | 58469fd2343039c195a88d0b171ba9af2dce40be
* Android Cleanup: Remove commented code, make immutables final againSven Gothel2011-08-112-16/+3
|
* EGL Fixes ...Sven Gothel2011-08-095-65/+91
| | | | | | - EGLDrawableFactory: createProxySurfaceImpl: add proper config choosing - EGLCapabilities/EGLGraphicsConfiguration: Add nativeVisualID - All: Avoid critical array access -> use NIO
* Adapt to DynamicLibraryBundleInfo API change ; Remove non std EGL/ES libs ↵Sven Gothel2011-08-093-15/+8
| | | | (Android)
* EGLPBuffer: remove 'ownEGLDisplay=true' (just wrong), add destroyImpl()Sven Gothel2011-08-073-5/+8
|
* EGLDrawable.setRealized(true) - no update gfx-config if we already have ↵Sven Gothel2011-08-072-11/+10
| | | | proper EGL type.
* GLProfile / eager init: Use relaxed query, if context was created while ↵Sven Gothel2011-08-071-19/+74
| | | | initialize shared
* EGL Fix: Use config-id value, bug override it w/ renderable typeSven Gothel2011-08-061-4/+7
|
* EGL/Android: Favor driver's EGL/ES native library - Using Android's failsSven Gothel2011-08-063-0/+26
| | | | FIXME: find proper solution, instead of using hardcoded and non-std lib names
* fix jogl.all-mobile.jar/jogl_mobile configurationSven Gothel2011-08-053-22/+12
|
* 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-013-2/+10
| | | | | Ubuntu: sudo apt-get install mesa-utils-extra libegl1-mesa libegl1-mesa-drivers libgles1-mesa libgles2-mesa
* Refine some DEBUG code (verbosity)Sven Gothel2011-08-012-6/+12
|
* EGL: Set CTX_PROFILE_ES2_COMPAT if ES2; Allow any native device; Don't use ↵Sven Gothel2011-07-314-18/+13
| | | | | | | | | | | | | libGL.so; Cosmetics EGL: Set CTX_PROFILE_ES2_COMPAT if ES2; Allow any native device for EGL - EGLDrawableFactory::getIsDeviceCompatible() -> true always, impl. shall handle all native windowing toolkit layers, if available. Don't use libGL.so - desktop GL library is exclusive for desktop bindings
* EGL: Collect all avail EGL caps w/o GLProfile preset ; Tolerate failing ↵Sven Gothel2011-07-312-39/+38
| | | | | | | | | | | | | EGL.eglChooseConfig() ; Cosmetics Collect all avail EGL caps w/o GLProfile preset - pass GLProfile null for collecting all available EGL GLCapabilities, allowing EGLGLCapabilities to set the GLProfile regarding EGLConfig's renderableType. Tolerate failing EGL.eglChooseConfig() - use chooser algo, trying to pick one EGLConfig manually Cosmetic toHexString change
* EGL: Query EGL_RENDERABLE_TYPE, store it in EGLGLCapabilities and test w/ ↵Sven Gothel2011-07-312-9/+93
| | | | | | | | GLProfile compatibility EGLConfig's EGL_RENDERABLE_TYPE determines ES1, ES2 or VG usage (bitfield). We have to store and compare it's value w/ the desired GLProfile to choose a valid one, or just store it.
* GLContextImpl: GLContextLock -> RecursiveLockSven Gothel2011-04-231-5/+5
| | | | | | | | | 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-1/+1
|
* JOGL GLDrawableFactory: Expose experimental method createProxySurface(..) ↵Sven Gothel2011-02-281-0/+5
| | | | | | for new windowing system ad-hoc development. WARNING: This method may change ro be removed over time!
* changes due to code cleanup in gluegen.Michael Bien2011-02-261-2/+3
| | | | | | - StringBuffer -> StringBuilder - ReflectionUtil.getBaseName -> class.getSimpleName() - cleanup imports, generics and @Override for all touched classes