| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
- Based on Andres Colubri's initiative and commit 218d67fc0222d7709b21c45792d44501351939c4.
- Reading real screen refresh rate ('stolen' from NEWT)
- Properly handling swap-interval and vsync-to in native code
- Increasing accuracy vsync-to to microseconds
Tested manually w/ TestGearsES2AWT.
|
| |
|
|
|
|
| |
removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition]' doesn't work
|
|
|
|
|
|
|
|
|
|
| |
no exception,
- bug 548: Another regression: pixelfmt failed for 10.6.7 and/or software OpenGL
- enforcing accelerated leads to no pixelformat,
- using the NSOpenGLView defaultPixelFormat causes to SIGSEGV
- ctx creation failure shall just lead to return null, no immediate exception
|
|
|
|
|
| |
- release on main-thread doesn't wait anymore
- use recursive lock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
DestroyNSWindow0
The CALayer animations (add/remove/swap) confused somewhat rendering (layer position) and
even triggered a deallocation sometimes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
reparenting
Test: enable NEWT 'onscreen' case
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
- 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/.. !
-
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
MainThread Thread name[s]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Demos are working again:
demos.jrefract.JRefract
- X11, Win32, OSX
-Dsun.java2d.opengl=true demos.jrefract.JRefract
- X11, Win32
demos.readbuffer.Main [-GL2,-GL2ES1] -test 0 demos.es1.RedSquare
- X11, Win32, OSX, EGL
demos.readbuffer.Main [-GL2,-GL2ES1] -test [12] demos.es1.RedSquare
- X11, Win32
- OSX not, because of the missing feature of
attaching a read surface.
- EGL not, because the emulation I used didn't support
attaching a read surface. Emulation bug .. probably ..
MacOSXWindowSystemInterface.m createContext():
- Verify if passed surface handle _is_ a view,
now it could be a pbuffer etc .. handle as well.
Cleanup GLDrawableImpl.setRealized(boolean realized)
- Calls setRealizedImpl() (implementation) now,
and only if new stated differs ..
- setRealizedImpl() fixed for:
MacOSXPbufferCGLDrawable: recreate/destroy
WindowsOffscreenWGLDrawable: recreate/destroy
WindowsPbufferWGLDrawable: no-recreate/destroy
X11OffscreenGLXDrawable: recreate/destroy
X11PbufferGLXDrawable: recreate/destroy
WindowsWGLContext:
- wglMakeContextCurrent(): uses isFunctionAvailable ..
- create():
Uses WGL.MakeCurrent() and releases the created context,
due to unavailable MakeContextCurrent extensions
before updating the procaddress tables.
|
| |
|
|
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
|