| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
constructor
|
|
|
|
| |
AWTDevice: Remove subtype
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
public class GLDrawableFactoryImpl.
Michael Weber's test case (commit e7388512b69979d00e5a213a1b166a1b1726ae0c)
pointed me to the flaw in GLDrawableFactory which exposed a non-public method,
ie. 'getOrCreateSharedContext()'.
This lead to the assumption, that the 'shared' drawable/context of the factory is multi purpose
and may be used for application context sharing - which is not the case.
Changed Michael's test case to use a local shared pbuffer based drawable/context
and made the method non-public, where it belongs.
|
|
|
|
| |
creation on AWT thread (may deadlock)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instance ; Applet's on OS X are working
Generalize OffscreenLayerSurface
- Using new OffscreenLayerSurface allows using this functionality in a clean manner,
ie. no 'dirty' usage of MacOSXJAWTWindow in a JOGL GL class.
- 'Promoting' OffscreenLayerSurface functionality to JAWTWindow
and it's handling to GLDrawableFactoryImpl::createGLDrawable().
- Move MacOSXCGLDrawableFactory's "MacOSXJAWTWindow getLayeredSurfaceHost(NativeSurface surface)"
to NativeWindowFactory "OffscreenLayerSurface getOffscreenLayerSurface(NativeSurface surface, boolean ifEnabled)"
Use local JAWT instance
- Only w/ a local JAWT instance per JAWTWindow it is possible to switch between
offscreen-layer and onscreen. We also have to determing offscreen-layer lazy
at surface lock, since only at that time we have knowledge whether it's an Applet
or not.
+++
ContextUpdater:
Use local pthread mutex, add DEBUG output
JAWTWindow/NewtCanvasAWT:
Adding methods to request offscreen-layer-surface (if supported),
besides 'if applet' this may trigger the new functionality.
+++
Applet's on OS X are working:
- OS X 10.6.4
- Safari:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- OS X 10.7
- Safari:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
|
|
|
|
|
| |
It turns our that the native ContextUpdater does not work reliable in all cases,
hence we need to verify if the drawable size has changed as well.
|
|
|
|
|
| |
MutableGraphicsConfiguration allows derivations to set the chosen capabilities,
hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
|
|
|
|
|
|
| |
reparenting
Test: enable NEWT 'onscreen' case
|
|
|
|
|
|
|
| |
- AnimatorImpl: evaluate double negation
if(!skipWaitForCompletion(Thread)) -> if(blockUntilDone(Thread))
- Simplify finishLifecycleAction() and reduce timeout
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was too fast introducing these accessors, since they are currently not needed
and hence redundant.
Complete
- 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff
Partial in regards to the holder interfaces only:
- d8fa00d35a49f4faf5f04aeb7e2bba4e972965f5
- f51e3dad6c4bd1f6d0001cecf6a0f692400ed602
- 46542168d64b37f544f61802693f15b59b224e4e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attach/detach our GL one
- it seems to be more stable, having one root CALayer attached to the JAWT_SurfaceView forever
- tackles crach at GL layer destruction
- proper release of all GL layer resources
- now final [gl-layer dealloc] happens at very destruction of JAWT object,
even though it was removed from root-layer earlier (and all other references)
- see comment in MacOSXWindowSystemInterface-pbuffer.m :: createNSOpenGLLayer(..)
- at least no more crash .. and resource release ASAP, but the GL-layer itself (see above)
|
|
|
|
|
|
|
|
|
|
|
|
| |
While impl. recreation for offscreen surfaces @ WindowImpl.setSize(),
commit 51ad6992e068f25d86d2c9e085bd7ec6f49d2432, it appears Animator deadlocks in some cases.
finishLifecycleAction() [blocks until pause() .. is accomplished]
queries whether we are even able to wait using skipWaitForCompletion().
The latter method can only query if we are on the animation thread or AWT-EDT, etc,
but not if we have traversed through a 3rd party thread, eg NEWT EDT.
This patches limits the wait with a timeout of 20frames @ 60Hz (20*16ms).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Better JAWT* name for offscreen layer surface:
- MacOSXCGLDrawableFactory, JAWTUtil, JAWTWindow, MacOSXJAWTWindow
- FIXME: Need to get rid of the cached JAWT instance,
in case we like to have dual usage of offscreenLayerSurface and onscreen.
This would be done implicit by using NEWT .. hence low prio.
AWTGraphicsConfiguration:
- Fix create(): Use capsRequested for AWT aligned caps if capsChosen is null.
(was capsChosen .. which is null)
- Add updateGraphicsConfiguration() which allows to update the AWTGraphicsConfiguration.
NewtFactoryAWT:
- Add updateGraphicsConfiguration() .. entrypoint for AWTGraphicsConfiguration.updateGraphicsConfiguration()
NSOpenGLLayer Impl:
- For 'some reason' the layer's position is initially negative, fix it @ 1st 'draw'
- Re-add CVDisplayLink OpenGL setting .. for what it's worth .. I don't know
JAWTWindow:
- Remove test setting: Only enable offscreenLayerSurface for applets if avail.
(New unit test enables it seperatly)
NewtCanvasAWT:
- If NEWT child is offscreen, attach AWTMouseAdapter and AWTKeyAdapter
to route these AWT input events to NEWT.
- Don't loose-focus if NEWT child is offscreen.
- Impl. NativeSurfaceHolder, NativeWindowHolder
- NativeWindow is created at construction
and it's GraphicsConfiguration updated at addNotify(..).
- At addNotify/reparent: try harder to determine proper NEWT child size:
- use preferred size if set
- use minimum size if set
- subtract insets from container size
OffscreenWindow/WindowImpl:
- Allow setSize() .. currently NOP for offscreen.
- WindowImpl: Commented out recreate case for offscreen-setSize ..
TEST: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01AWT
Passed tests:
- GLCanvas
- NewtCanvasAWT/OffscreenWindow
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- NativeSurfaceHolder interface allows access to it's implementation's NativeSurface reference.
- NativeWindowHolder interface allows access to it's implementation's NativeWindow reference.
Implement or extend interface w/ these accessors whereever it seems fit:
- NEWT Window
- GLDrawable
These accessors allow lower layers to retrieve the NativeSurface/Window instance
w/o knowledge of the 'upper' frameworks, ie. NativeWindow/JOGL or JOGL/NEWT.
Commited in followups (due to mixed semantical changes in those files):
- JAWTWindow
- NewtCanvasAWT
- Some NEWT impl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Undo 368cbf4462d7f3635c1ef4497424c360b5ccc203:
- "use SurfaceUpdateListener() to notify layer", simply use MacOSXCGLContext's swap impl.
MacOSXCGLContext:
- NSOpenGLImpl.create():
- issues createNSOpenGLLayer() using tex-size (maybe POT) as args
- attaches the NSOpenGLLayer to the JAWT layered surface host
- NSOpenGLImpl.setSwapInterval() propagates interval to our NSOpenGLLayer impl.
- NSOpenGLImpl.swapBuffer() (layer case):
- waits for v-sync if enabled (v-sync), or until native 'draw' is finished (tearing)
using our pthread/ NSOpenGLLayer synchronization.
The latter uses CADisplayLink or CVDisplayLinkRef for v-sync synchronization.
- flushes our local ctx
- triggers our NSOpenGLLayer to 'draw'
- MacOSXPbufferCGLContext create() sets the texture size independently of pbuffer size (POT/NPOT)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
features, used by pbuffer drawable before a current context.
- Also extract getNextPowerOf2() -> GLBuffers (remove redundancy)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- attributes +NSOpenGLPFANoRecovery +NSOpenGLPFAAccelerated
- use SurfaceUpdateListener() to notify layer
- swapBufferImpl() adapt to 0038e2d41825c22bdd18a7b86a8229a3fab674a3
- pbuffer: don't enforce POT tex-size to surface size, but pbuffer only
- FIXME: Check POT pbuffer/tex-size for X11/Win32/.. !
-
|
|
|
|
| |
offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
|
|
|
|
| |
This allows allowing updateHandle()/destroyHandle() to be called.
|
|
|
|
|
|
|
|
| |
- OSXUtil: NSView backing creation
- OSXUtil: AttachJAWTSurfaceLayer
- MacOSXCGLContext.create(): Attach NSOpenGLLayer if layered
- MacOSXCGLDrawable.updateHandle(): if direct: add NSView backing layer
- MacOSXCGLDrawable: Add getNSViewHandle() to distinguish between NSView and none (CGL/pbuffer)
|
|
|
|
|
|
|
|
|
|
| |
Cleanup
- use Platform OS_TYPE
- ..
JAWT* version flag
- if JAWTWindow is Applet, attempt offscreenLayer if avail
- ..
|
|
|
|
|
|
|
|
|
| |
- Use proper OSX types for NS/CGL prototypes (gluegen) and impl.
- Impl layeredSurface (native):
- OSXUtil: NSView backing creation
- OSXUtil: AttachJAWTSurfaceLayer
- CGL: NSOpenGLLayer type impl. and hook
|
| |
|
|
|
|
| |
dropping GL2ES[12] lists
|
| |
|
| |
|
|
|
|
| |
usage and FBOMRT
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
no ':' for void func call)
|
|
|
|
| |
mainThread
|
|
|
|
|
|
| |
Cleanup Warnings and OSX ContextUpdater
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lifecycle deterministic; Remove warnings
Fix shared ctx release [onMainThread]
- Releasing the shared contexts caused a freeze of about 10s from one of the shared release operations.
[NSOpenGLContext release]
- Thorough triage concluded the workaround to release the shared ctx on the main thread.
- Using enhanced GLContextShareSet, see below
Make GLContextShareSet lifecycle deterministic
- Programmatically control the lifecycle of tracked shared ctx allows us using 'hard' references.
- Features queries for isShared() and ofc unregister a share set if all are destroyed.
Remove warnings
- MacOSXWindowSystemInterface.m used 'long', where 'GLint' was requested.
|
|
|
|
|
|
| |
We not only shall skip windowing system triggered repaint if another animation thread
is running, but also if the current thread is the animator thread.
This keeps the animator intervals stable while resizing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which only holds the 'update' state now.
Avoid calling updater() for every makeCurrent(), but if view's frame has changed only.
This solves the pixel flickering experienced on OSX.
- GLContextImpl:update() -> drawableUpdatedNotify() w/ comments
- ContextUpdater holds context, view, old view frame and the update state.
It doesn't issue NSOpenGLContext update() by itself, but allows querying and clearing the update flag.
- MacOSXOnscreenCGLContext impl drawableUpdatedNotify()
- register via ContextUpdater, and use it if available.
|