summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native
Commit message (Collapse)AuthorAgeFilesLines
* OSX CALayer fix for Java7 (force CALayer to 0/0, always remove all animations)Sven Gothel2012-02-131-1/+4
|
* NativeWindow/OSX: Fix Offscreen CALayer SIGSEGV @ Shutdown (Cleanup referencing)Sven Gothel2012-01-191-7/+41
| | | | | | | | | | - allocate CALayer w/ invoking init: [[CALayer alloc] init] - attach CALayer to JAWTSurfaceLayer w/o autorelease: surfaceLayers.layer = layer; // already incr. retain count - destroy CALayer @ JAWTWindow destroy
* NEWT/OSX CALayer Animation Fix: Use '[layer removeAllAnimations]', '[layer ↵Sven Gothel2012-01-161-5/+5
| | | | removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition]' doesn't work
* JAWT_DrawingSurface.c: Fail fast in case of NULL platformInfo or ↵Sven Gothel2011-12-181-0/+7
| | | | sizeof(platformInfo)==0
* Fix 96205926731aeb61a862c87974f611d814937c54 GDIUtil native code.Sven Gothel2011-12-011-1/+1
|
* Complete commit 2c0a0981f7e1376064abd981c79c65c9d1b57410 ; Missed native impl.Sven Gothel2011-12-011-17/+17
|
* MacOSX: Disable native verbositySven Gothel2011-11-261-1/+1
|
* OSX GLLayer (native): Remove CALayer add/remove/swap sublayer animation; Fix ↵Sven Gothel2011-11-261-14/+21
| | | | | | | DestroyNSWindow0 The CALayer animations (add/remove/swap) confused somewhat rendering (layer position) and even triggered a deallocation sometimes.
* X11Util.shutdown(): Remove x11IOErrorHandlerSven Gothel2011-11-261-0/+5
|
* NativeWindow X11 Locking: Fix XInitThreads/XLockDisplay/XUnlockDisplay Usage ;Sven Gothel2011-11-251-1/+4
| | | | | | | | | | | | XLockDisplay/XUnlockDisplay shall only be used if XInitThreads() was successful, otherwise it has no effect (X11 spec). - Only issue XInitThreads() if firstX11ActionOnProcess==true, store result to determing whether we can utilize XLockDisplay/XUnlockDisplay. - If we cannot utilize XLockDisplay/XUnlockDisplay, use RecursiveLock - NativeWindowFactory: Only return AWTToolkitLock or X11JAWTToolkitLock if explicitly requested
* Fix OS X JAWT SIGSEGV @ NEWT Window creation ; Reloc ↵Sven Gothel2011-11-181-24/+25
| | | | | | | | | AttachJAWTSurfaceLayer() OSXUtil -> MacOSXJAWTWindow Threading/sync issue when creating a NEWT window, which issues a Java callback from native code (positionChanged()). The latter requires a location validation w/ getLocationOnScreen() involved. Hence getLocationOnScreen() shall not lock the JAWT native resources, since it may not be ready yet (-> threading/sync issue).
* OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl ↵Sven Gothel2011-11-111-2/+3
| | | | | | reparenting Test: enable NEWT 'onscreen' case
* Minor edits: Remove dead code / fix dbg printfSven Gothel2011-11-111-1/+1
|
* OS X Layered View: Part6 (native) Using a root CALayer where we ↵Sven Gothel2011-11-101-1/+101
| | | | | | | | | | | | | | | | | 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)
* OS X Layered View: Part3 JAWTWindow/MacOSXJAWTWindow (Java/Native)Sven Gothel2011-11-091-0/+53
| | | | | | | | | | | | | | | | JAWTWindow: - Add comment about caller of cstr, since it uses reflection - Field 'config' is of type AWTGraphicsConfiguration, validate and type it - Impl. NativeSurfaceHolder/NativeWindowHolder 'hooks' MacOSXJAWTWindow: - Use agnostic JAWTUtil.isJAWTVersionUsingOffscreenLayer() to determine 'isOffscreenLayeredSurface'. We may promote this notion to JAWTWindow, which already holds 'isApplet' - lockSurface() case 'isOffscreenLayeredSurface': - Create dummy NSWindow (OSXUtil) for getWindowHandle() - Fix chosen caps: offscreen
* OS X Layered View: Use pbuffer method (pbuffer w/ dbl buffer)Sven Gothel2011-11-061-4/+4
| | | | | | | | | - 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/.. ! -
* OSX: CGL type cleanup ; layeredSurface impl.Sven Gothel2011-11-051-3/+62
| | | | | | | | | - 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
* Nativewindow/OSX: GetLocationOnScreen() must use [win frame] for window height.Sven Gothel2011-10-291-3/+7
|
* Fix Solaris gcc args ; Cleanup dependencies and linker args; Adding JVM arch ↵Sven Gothel2011-10-182-4/+4
| | | | | | | | flags (-d32/-d64) ; glxext.h uses 'gl-64bit-types.h' Cleanup dependencies and linker args - JOGL/NEWT: remove Xxf86vm dependency - NativeWindow Solaris: Use std 'Xinerama' and 'xf86vmode'
* OSX/SWT: Adding OSXUtil: RunOnMainThread(), IsMainThread() / Utilizing those ↵Sven Gothel2011-10-133-1/+131
| | | | | | | | | | | | | | for SWT access/calls Adding OSXUtil: RunOnMainThread(), IsMainThread() - Issuing a native call where the user Runnable is to be performed on the main thread - Enable query if we are on the main thread. Utilizing those for SWT access/calls - Using the above to call all SWT functions on the main thread if required (incomplete) TODO/Issues: - JOGL OSX CGL Context fails, ie expecting NS, but having CGL
* NativeWindow/OSX: Use screen of windowSven Gothel2011-10-121-3/+2
|
* OSX Minor Cleanups: ctx delete note (freeze when shared ctx), Better ↵Sven Gothel2011-10-121-1/+1
| | | | MainThread Thread name[s]
* Fix Nativewindow GetLocationOnScreen OSX impl. - Transform OSX origin ↵Sven Gothel2011-10-121-3/+14
| | | | bottom-left to our top-left origin.
* NativeWindow/OSX: Add nativewindow_macosx lib and nativewindow.os.macosx.jar ↵Sven Gothel2011-09-251-0/+106
| | | | for 'GetLocationOnScreen()'
* WindowsDWM: Check all methods for availability - Cleanup headerSven Gothel2011-09-042-9/+2
|
* Complete translucency support for Win32 - tested w/ NEWTSven Gothel2011-09-042-0/+134
| | | | | | | https://jogamp.org/bugzilla/show_bug.cgi?id=517 - Adding some Windows DWM entries to GDI (manual) for translucency support - Add translucency setting in WindowsWGLGraphicsConfiguration*
* revert: a7340fd941b26d633c438cb5adb22f2c30a5cff0Sven Gothel2011-08-311-5/+4
| | | | NativeWindow X11 Error Handler: If quiet do not print message on stderr.
* NativeWindow X11 Error Handler: Even if quiet, print message on stderr.Sven Gothel2011-08-311-3/+5
|
* AWT/X11 Reduce XQueryExtension 'hang' ; Impl. use XineramaIsActive() instead ↵Sven Gothel2011-08-011-8/+9
| | | | | | | | | | 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)
* X11 Nativewindow/NEWT: X11 Error Handler (JNIEnv query for thread, stack ↵Sven Gothel2011-06-261-12/+57
| | | | | | | | | trace), cleanup - X11 Error Handler: if throwing JVM stack trace or fatal JVM error query proper JNIEnv for running thread and attach thread to JVM if necessary. - NEWT/X11: Proper XEvent polling documentation, cleanup window creation event mask
* Utilize GlueGen's platform independent header for stdin.h, gluegen_stdint.h, ↵Sven Gothel2011-06-112-18/+2
| | | | | | | .. (remove local copy) - Use them for gluegen code generation - Use them for native compilation (cc)
* NativeWindow/X11: Simple cleanup/generalization ..Sven Gothel2011-04-261-5/+16
|
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-093-43/+43
| | | | | | | | | | | | | | | jogamp.<module> (2/2) - edit files - com.jogamp.opengl.impl -> jogamp.opengl - com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc - com.jogamp.nativewindow.impl -> jogamp.nativewindow - com.jogamp.newt.impl -> jogamp.newt This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK.
* Windows RegisterClass: Use new RegisteredClassFactory (window class), Misc.Sven Gothel2010-12-124-110/+229
| | | | | | | | | | | | | | | | | This solves the issue when an applet is started/stop and started again, or another applet runs in the same JVM. Also soves the issue for multiple JVMs. RegisteredClassFactory can be instanced to manage one shared window class, currently in use for GDI's dummy window and NEWT. A class base name and a window proc handle must be passed in the factory cstr. Before registering, the class is tested if already exists, eg another applet in the same JVM. If registration fails, the class name will iterate until successful or MAX_INT reached, eg if multiple JVMs are running. Added NativeWindow Common Native Code.
* GDI: Fix CreateDummyWindow: Use local getModuleHandle(NULL) and synchronize ↵Sven Gothel2010-12-091-30/+33
| | | | factory method.
* X11 DummyWindow: Pass size and set size in proxySven Gothel2010-12-041-6/+5
|
* NativeWindow/Windows: Fix CreateDummyWindow gluegen and usageSven Gothel2010-11-221-1/+1
| | | | NativeWindow+JOGL/Windows: Complete Opaque types
* Moving NEWT X11Window GetRelativeLocation() native implementation to ↵Sven Gothel2010-11-171-14/+62
| | | | NativeWindow X11.
* Move GDI GlueGen wrapping from JOGL -> NativeWindow (following X11). Moving ↵Sven Gothel2010-11-171-0/+152
| | | | NEWT WindowsWindow GetRelativeLocation() native implementation to GDI as well.
* X11: Make X11 error handler quiet where we expect an X11 error, ie OpenGL 4 ↵Sven Gothel2010-11-161-4/+8
| | | | not available ..
* NEWT: Add optional eager native initialization ; Proper exception handlingSven Gothel2010-11-141-0/+6
| | | | | | | | | | NEWT: Add optional eager native initialization of Display and Screen to overcome a possible chicken/egg situation. This is useful to be able to request the AbstractGraphicsDevice, via getGraphicsDevice(). Otherwise the abstract device won't be available before the dependent components (Screen and Window) are realized. Throw NativeWindowException in case native creation failed.
* Removed no more used (see f47e8be170731d75a8b6002621a1541f90160465) and ↵Sven Gothel2010-11-081-222/+0
| | | | prorietary extutil.h
* Remove ancient DEC licensed file, use std X11 Xinerama extension instead.Sven Gothel2010-11-045-652/+5
|
* NativeWindow: Provide 'setX11ErrorHandler(boolean onoff)'Sven Gothel2010-11-031-7/+25
|
* Minor cleanup: strings, unused vars, ..Sven Gothel2010-11-021-3/+13
| | | | | | | | | | DEBUG strings w/ thread name nativewindow.TraceLock -> nativewindow.debug.ToolkitLock.TraceLock Sync Xmisc (DummyWindow) with NEWT's creation test scripts: awt and non-awt usage
* Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6; Misc ..Sven Gothel2010-10-261-1/+1
| | | | | | | | | | | Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6 - Workaround in TestGLWindows01NEWT: same create/destroy order - Prove bug with simple native test app: jogl/test/native/displayMultiple02.c Misc: - Reverted d52181032830acdd5e4069a41ccd0daff5922d8a, ie reenable x11IOErrorHandler (nativewindow) - GLDrawableHelper: methods -> final - X11Util.NamedDisplay: remove unused RecursiveLock, Cloneable
* can't enable x11IOErrorHandler without disableSven Gothel2010-10-261-1/+1
|
* JOGL: Reenable Applet/Webstart/RCP support for JOGL + AWT + X11Sven Gothel2010-10-141-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed GLProfile/NativeWindowFactory/.. initialization methodology: GLProfile: public static synchronized void initSingleton(final boolean firstUIActionOnProcess); NativeWindowFactory: public static synchronized void initSingleton(final boolean firstUIActionOnProcess); +++ Introducing NativeWindow ToolkitLock, implementations are NullToolkitLock JAWTToolkitLock X11JAWTToolkitLock X11ToolkitLock AbstractGraphicsDevice provides generic global toolkit locking methods, implemented by the ToolkitLock interface. ToolkitLock's are aggregated in NativeWindow's DefaultGraphicsDevice to implement it's superclass lock()/unlock() methods. This enables a device specific locking strategy, ie on X11/AWT utilizing JAWT && X11 locking, and maybe none for others (NEWT). No locking is required for X11 / AWT, in case the above mentioned initialization happened as a 'firstUIActionOnProcess'. The ToolkitLock factory is currently a hardcoded part of NativeWindowFactory. We may have to allow 3rd party NativeWindow implementations to register custom ones. +++ com.jogamp.opengl.impl.GLDrawableImpl cleanup: Dealing with all locking code, providing all public methods. Exceptions are commented. Specializations x11/windows/.. only contains platform code. Pulled down access qualifiers if possible public -> protected. com.jogamp.nativewindow.impl.x11.X11Util Wrapping all X11Lib method with the new locking code. com.jogamp.nativewindow.impl.jawt.JAWTUtil Utilize global SunToolkit.awtLock() is available, the fallback to global JAWT.lock(). The latter just invokes the first. javax.media.nativewindow.awt.AWTGraphicsDevice setHandle(long handle) -> setSubType(String type, long handle) which also resets the ToolkitLock respecting the new type. This ensures correct locking after the sub type has been determined, ie AWT using an X11 peer. +++ Misc Changes done on the way .. GLCanvas: Fixed inversed this.drawableHelper.isExternalAnimatorAnimating() condition, which disabled normal repaint. GLJPanel: Removed drawableHelper.isExternalAnimatorAnimating() condition, which disabled painting, since the animation thread just updates the source image. NEWT WindowImpl: When reparenting back to parent and 'refit' child if it's size exceeds it's parent. More 'Fix: Memory consumption' commit 6ced17f0325d5719e992b246ffd156e5b39694b4. NEWTEvent: Removed code to evaluate the 'system event' attribute, need to find a better approach.
* NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit testSven Gothel2010-10-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | NativeWindow/NativeSurface Refactoring - Using NativeSurface interface - NativeWindow extends NativeSurface, adds getLocationOnScreen(Point) - NativeWindow add: getParent() - NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must. - NullWindow -> ProxySurface impl NativeSurface - JOGL: Uses NativeSurface only. - GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface() Added mouseClick NEWT/AWT unit test JOGL: - GLAnimatorControl add: resetCounter() - NEWT: - GLWindow counters: return GLWindow counters always - WindowImpl - requestFocus() wait until done - reparent: readded requestFocusImpl(true), native impl skips java focusAction if reparented - X11Window: Add XRaiseWindow() in requestFocus()
* Removed COPYRIGHT.txt file, whichSven Gothel2010-09-141-26/+23
| | | | | | | | | | | | | | | | | | | | | | | is redundant due to COPYRIGHT notice in LICENSE.txt. It's product usage terms are no more applicable, since our repository is not used by Sun Microsystems to deliver a product. LICENSE.txt changes: - Updated SGI FreeB license reference from 1.1 to 2.0 - Dropped Sun alternative license, which is redundant due to the FreeB 2.0 license. - Added JogAmp Community and common denominator: New BSD 3-clause license README: - Added contacts - Sun -> JogAmp - Added Michael Bien Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.