| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
(implicitly loaded by NativeWindowFactory)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@ 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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
constructor/destroy()
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
instead of constructor for clarity.
- prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
MutableGraphicsConfiguration allows derivations to set the chosen capabilities,
hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
|
| |
|
|
|
|
| |
is respected in EGL
|
| |
|
|
|
|
|
|
| |
available, ignore the given ID
Fixes Omap3 EGLConfig's which does not have a native visual ID
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
commit cfb9e118e020707842e6b5136b07f5ab149540c1
|
| |
|
|
|
|
| |
58469fd2343039c195a88d0b171ba9af2dce40be
|
| |
|
|
|
|
|
|
| |
- EGLDrawableFactory: createProxySurfaceImpl: add proper config choosing
- EGLCapabilities/EGLGraphicsConfiguration: Add nativeVisualID
- All: Avoid critical array access -> use NIO
|
|
|
|
| |
(Android)
|
| |
|
|
|
|
| |
proper EGL type.
|
|
|
|
| |
initialize shared
|
| |
|
|
|
|
| |
FIXME: find proper solution, instead of using hardcoded and non-std lib names
|
| |
|
|
|
|
| |
- Add platform type to key
|
|
|
|
|
| |
Ubuntu:
sudo apt-get install mesa-utils-extra libegl1-mesa libegl1-mesa-drivers libgles1-mesa libgles2-mesa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
RecursiveLock maintains a queue of waiting Threads,
ensuring the longest waiting thread will be notified at unlock.
Delete GLContextLock.
Cleanup HashMap generics style.
|
| |
|
|
|
|
|
|
| |
for new windowing system ad-hoc development.
WARNING: This method may change ro be removed over time!
|
|
|
|
|
|
| |
- StringBuffer -> StringBuilder
- ReflectionUtil.getBaseName -> class.getSimpleName()
- cleanup imports, generics and @Override for all touched classes
|