summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
Commit message (Collapse)AuthorAgeFilesLines
* Misc cleanup: add @OverrideSven Gothel2012-06-271-43/+44
|
* NativeSurface Cleanup (API Change) - Adapt to GlueGen Lock cleanup commit: ↵Sven Gothel2012-06-272-23/+19
| | | | | | | | | | | | 834b9e530e652b7ff7c5e222720bce3ad2b11c5f - adapt to GlueGen Lock cleanup - remove isSurfaceLocked(), use 'null != getSurfaceLockOwner()' instead Misc: - remove unused priv./impl. methods - add @Override
* NEWT WindowImpl.runOnEDTIfAvail(..): Run task from current thread if owning ↵Sven Gothel2012-06-271-5/+9
| | | | | | the windowLock. Avoiding deadlock when cmds issued from within locked code path. This allows e.g. GLEventListener::display(..) { .. glWindow.setSize(100, 100); .. }
* Implement Bug #598 - JOGL ALL JAR File Change incl. it's Native Jar URL ↵Sven Gothel2012-06-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Derivation - Depends on GlueGen commit 9a71703904ebfec343fb2c7266343d37a2e4c3db JAR file name changes: ALL JARs: - jogl.all.jar -> jogl-all.jar - jogl.all-noawt.jar -> jogl-all-noawt.jar - jogl.all-mobile.jar -> jogl-all-mobile.jar - jogl.all-android.jar -> jogl-all-android.jar - jogl.all-android.apk -> jogl-all-android.apk Atomic JARs: - nativewindow.core.jar -> nativewindow-core.jar - nativewindow.awt.jar -> nativewindow-awt.jar - nativewindow.os.x11.jar -> nativewindow-os-x11.jar - nativewindow.os.win.jar -> nativewindow-os-win.jar - nativewindow.os.macosx.jar -> nativewindow-os-osx.jar - jogl.core.jar -> jogl-core.jar - jogl.sdk.jar -> jogl-sdk.jar - jogl.glmobile.jar -> jogl-glmobile.jar - jogl.glmobile.dbg.jar -> jogl-glmobile-dbg.jar - jogl.util.jar -> jogl-util.jar - jogl.glutess.jar -> jogl-glutess.jar - jogl.glumipmap.jar -> jogl-glumipmap.jar - jogl.util.fixedfuncemu.jar -> jogl-util-fixedfuncemu.jar - jogl.awt.jar -> jogl-awt.jar - jogl.swt.jar -> jogl-swt.jar - jogl.util.awt.jar -> jogl-util-awt.jar - jogl.os.x11.jar -> jogl-os-x11.jar - jogl.os.win.jar -> jogl-os-win.jar - jogl.os.osx.jar -> jogl-os-osx.jar - jogl.os.android.jar -> jogl-os-android.jar - jogl.gldesktop.jar -> jogl-gldesktop.jar - jogl.gldesktop.dbg.jar -> jogl-gldesktop-dbg.jar - jogl.glugldesktop.jar -> jogl-glu-gldesktop.jar - jogl.util.gldesktop.jar -> jogl-util-gldesktop.jar - jogl.omx.jar -> jogl-omx.jar - jogl.cg.jar -> jogl-cg.jar - newt.core.jar -> newt-core.jar - newt.ogl.jar -> newt-ogl.jar - newt.awt.jar -> newt-awt.jar - newt.event.jar -> newt-event.jar - newt.driver.x11.jar -> newt-driver-x11.jar - newt.driver.win.jar -> newt-driver-win.jar - newt.driver.macosx.jar -> newt-driver-osx.jar - newt.driver.android.jar -> newt-driver-android.jar - newt.driver.kd.jar -> newt-driver-kd.jar - newt.driver.intelgdl.jar -> newt-driver-intelgdl.jar - newt.driver.broadcomegl.jar -> newt-driver-broadcomegl.jar Test JARs: - jogl.test.jar -> jogl-test.jar - jogl.test-android.jar -> jogl-test-android.jar - jogl.test-android.apk -> jogl-test-android.apk
* NEWT: Add virtual on-screen keyboard visibility interface methods incl. ↵Sven Gothel2012-06-214-9/+119
| | | | | | | | | | | | | Android implementation. Note: Currently only w/ Android implementation. Note: On Android there is no way to reliably be notified of the current keyboard state. It would be best, if your code does not rely on this information Window adds: - setKeyboardVisible(boolean) - isKeyboardVisible() // unreliable on Android
* Refine commit be7cac1713b166ca6578c685ec8a7231a8429919:Sven Gothel2012-05-134-1/+10
| | | | | | | | Throw ClassNotFoundException in Display/Screen/Window factory if neither custom nor default class is available. Suppress Warning of non existing custom class (in non DEBUG mode), rely on later ClassNotFoundException (see above).
* GLContext*: Remove '[set/is]Synchronized(..)' - Defaults to wait for locks: ↵Sven Gothel2012-05-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | 1. Drawable, 2. GLContext Remove deadlock situation where thread-1 (Animator Thread) holds the GLContext-Lock and acquires the Surface-Lock, while thread-2 (UI/Main/EDT) holds the Surface-Lock and attempts to create the GLContext and hence acquires the GLContext-Lock. A GLContext-Lock and hence makeing the GLContext current requires to hold the Surface-Lock. The prev. code acquired the locks in reverse order and allowed the deadlock as described above. This fix acquires the locks in the proper natural order 1 - Surface-Lock 2 - GLContext-Lock This fix also renders the use of the non-synchronized behavior invalid, since it is bogus not to wait for the GLContext lock where it waits for the Surface lock. It also seems nonsense not to wait for any of both locks and our code always waited for both (synchronized := true). The GLContext [set/is]Synchronized(..) methods are removed and waiting for the lock per default is the correct behavior.
* Android: Fix JOGL's (NEWT) Version activity: Use Launcher, show GL versionSven Gothel2012-05-042-10/+76
|
* Adapt to GlueGen commit cc76889a6fe96cffb91c9a3aa7934878c0ecd97e: Use ↵Sven Gothel2012-05-041-1/+1
| | | | ClassLoader to find JNI native libraries
* NEWT: Cleanup Broadcom/KD driver imports, add Jogamp (c)Sven Gothel2012-05-026-17/+35
|
* NewtFactory: Show failure in getCustomClass(..) - require both, packagename ↵Sven Gothel2012-05-021-3/+8
| | | | and classname
* NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' ↵Sven Gothel2012-05-025-19/+19
| | | | instead of static final int values.
* NEWT: Revert static/locked action instances due to possible deadlocks; class ↵Sven Gothel2012-05-023-176/+148
| | | | | | | | | | | | | | | Window.ReparentAction -> enum Window.ReparentOperation Revert static/locked action instances due to possible deadlocks - reverts commit: be59d561fd6ab8aa659e85cd962d38fffd1acb0a (partially) - reverts commit: 5742b1faa210401470032ef129e56a83c47fd046 Even thought the idea of having no temp. objects is nice to have, using a static instance requires locking which introduces a deadlock in case the action is being issued from diff. threads. class Window.ReparentAction -> enum Window.ReparentOperation (Minor API Change) Clarifies reparent operations using enums
* JOGLNewtAppletBase: Minor cleanupSven Gothel2012-05-011-2/+0
|
* Fix Bug 560 and NEWT window closing behavior in general for all platforms.Sven Gothel2012-05-016-28/+77
| | | | | | | | | | | | | | | | | | | | | | - NEWT/WindowImpl: - 'void windowDestroyNotify()' -> 'boolean windowDestroyNotify(boolean force)', allowing to signal a forced close, as well as replying whether the window has been closed. (called by native code) - destroy(): set states before releasing the window lock - NEWT/X11: Pass windowDeleteAtom for reconfigure window, in case of reparenting child to top-level - NEWT/OSX: - Add 'BOOL windowShouldClose()' impl., ie. having a chance to reject the close attempt - Common impl. for 'windowShouldClose' and 'windowWillClose' -> 'windowClosingImpl' utilizing new 'windowDestroyNotify' code (see above). Fixes bug 560. - NEWT/JOGLNewtApplet1Run: Refine out-of browser window behavior for window-close button - default: move NEWT window back to browser parent - closeable: close NEWT window - jogl-test-applets: Add NApplet-Closeable test (Applet out-of browser window is closable)
* NEWT/WindowImpl: Make all 'action' class instances final; Action's init() ↵Sven Gothel2012-05-011-110/+101
| | | | determines whether it shall be executed.
* Bug 556: Newt Mouse Synthetic Drag Event: Clear state if mouse enters/leaves ↵Sven Gothel2012-04-271-7/+14
| | | | | | | | | | | | | window. Since we cannot guarantee to have the pressed button information when receiving the mouse move event, we synthesize the dragged event (move while mouse button pressed). To simplify the situation and have a compromise, we clear the mouse pressed states when mouse enters or leaves the window to remove the dragged events at re-entering. This seems more sensible, since dragging after re-entering the mouse shall not be expected.
* Bug 570: NEWT General/X11: Decouple setFullscreen() and setAlwaysOnTop(); ↵Sven Gothel2012-04-271-30/+52
| | | | | | | | | | | | | | Use window-static instances for runnable actions NEWT General/X11: Decouple setFullscreen() and setAlwaysOnTop() - X11 fullscreen/above: Don't assume 'always-on-top' if switch to fullscreen. - WindowImpl: Remove relation between 'always-on-top' and fullscreen when quering and switching. Use window-static instances for runnable actions - Removes temp objects for EDT runnables - Uses synchronization on action instance to avoid concurrency
* Fix Bug 571: X11 behavior, where the PRESSED button is not included in the ↵Sven Gothel2012-04-271-1/+4
| | | | native mask.
* NEWT Input- Mouse-Event: Consitency of mouse button number; Add button -> ↵Sven Gothel2012-04-272-19/+36
| | | | button-mask func.
* Newt/AWT Event Factory: Add Mouse Wheel Event ConversionSven Gothel2012-04-242-2/+16
| | | | .. also reverse AWT rotation sign, since NEWT uses the reverse oriantation.
* NEWT/MainThread: Wait for new non daemon threads after 'main' class has ↵Sven Gothel2012-04-211-24/+102
| | | | finished, mimics proper Java behavior.
* NEWT/Android: Fix requestFocus() - run impl. on UI thread.Sven Gothel2012-04-181-3/+7
|
* NEWT/Android: Add (soft) keyboard input. Complete the Android -> NEWT key ↵Sven Gothel2012-04-162-77/+106
| | | | | | | | | | | | | | | | | | | | | | translation. Minor fixes for mouse as well. - AndroidNewtEventFactory - Android -> NEWT KeyCodes, leave out control keys like HOME, BACK, .. TBD .. - We don't consume the key event, in case we cannot map it, so the Android OS has a chance to handle the control keys. - Key-Release generates a Key Typed event. - Key/Mouse translate Android time-base (upTime) to Unix. - AndroidWindow - set our onKeyListener, using above tranlator - setFocusable(true) and setFocusableInTouchMode(true) on our SurfaceView, otherwise no key event will be delivered. Note: 'requestFocus()' must also be called on the view for key input! - Test: NEWTGearsES2Activity, which launches the soft key via: InputMethodManager mgr = (InputMethodManager) win.getAndroidView().getContext().getSystemService(Context.INPUT_METHOD_SERVICE); mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); // shows keyboard .. and requests the focus of the view for input.
* NEWT WindowImpl: Ensure screenChange suspense animation, even w/o having the ↵Sven Gothel2012-04-161-0/+4
| | | | | | | notify method being called. This happens on android, where we just react on an already happened screen rotate. W/o animation suspend GL rendering could be disturbed or the thread could starve.
* StringBuffer -> StringBuilder (Local objects, no concurrency) ; Impacts: ↵Sven Gothel2012-04-162-3/+3
| | | | Capabilities/GLContext API 'toString(StringBuilder)'
* AndroidWindow: Fix regression (commit ↵Sven Gothel2012-04-121-1/+1
| | | | c9066a6df7a0b8612a8a0b3e5c8977268a1257e8), no destruction on surface size change.
* Android: Cleanup AndroidWindow. NewtBaseActivity: Reset FPSCounter on ↵Sven Gothel2012-04-092-43/+15
| | | | resume, Sync LauncherUtil
* NEWT/Android: Add notion of 'brokenFocusChange' for Android impl, where ↵Sven Gothel2012-04-042-12/+16
| | | | requestFocus and focusChanged is always forced
* AndroidWindow/NewtBaseActivity: Properly split functionality, remove ↵Sven Gothel2012-04-032-81/+182
| | | | | | | | | | | | | | | | | | | | | | | | android.view.Window reference and use from AndroidWindow; Force transparency flag; Multiple NEWT Windows in Activity. AndroidWindow: - Force transparency flag to EGL Capabilities chooser (see commit 0d12af05128da433aa7b6767ba5a7f6ee9bce6c4) - Keep androidFormat besides nativeFormat, used to determine transparency flag and recreation. - Move transparency style selection from AndroidWindow.instantiationFinished() -> NewtBaseActivity.setContentView(..) - Remove AndroidWindow.becomeContentViewOf(..) and add it's fullscreen layout features to NewtBaseActivity.setContentView(..) NewtBaseActivity: - General support for multiple NEWT windows. - Adding functionality removed from AndroidWindow - see above - Adding 'addContentView(..)' and 'registerNEWTWindow(..)' which, besides 'setContentView(..)' performs registration of the NEWT window for the 'onDestroy()' method. The 'add*' and 'set*' variant also handle layout etc. - Add direct methods to set fullscreen feature and transparency theme.
* Enhance and generalize AWT Threading* implementation; Minor changes ..Sven Gothel2012-03-251-60/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Threading*: - add invoke(..) generalizing the Therading decision GLCanvas: - remove 'manual' Threading decision, simply call Threading.invoke(..) - use anonymous Runnable instances - remove drawable lock, drawable is volatile instead GLJPanel: - remove 'manual' Threading decision, simply call Threading.invoke(..) - use anonymous Runnable instances - DEBUG: Use getThreadName() prefix GLContextImpl: - Remove GLWorkerThread idle command on makeCurrent(), no holding of context in worker thread while idle. - DEBUG: Use getThreadName() prefix X11GLXContext: - DEBUG: Use getThreadName() prefix TODO: Validate whether it's OK for GLCanvas and GLJPanel to set Threading.Mode.MT as the default mode!
* Reduce Thread.dumpStack() in debug mode where no negative behavior appears ↵Sven Gothel2012-03-182-2/+0
| | | | or a stack trace may be helpful.
* Adapt to GlueGen IO resource changes URL -> URLConnection for effeciency; ↵Sven Gothel2012-03-171-25/+25
| | | | | | | | | | API doc enhancements; Minor edits - API doc added/enhanced: - ShaderCode - ShaderUtil - NewtBaseActivity: Clarify method / var names
* Android Tests: Using JogAmp's ActivityLauncher (gluegen commit: ↵Sven Gothel2012-03-142-31/+109
| | | | | | | | 0cfc7847c58b51c9a26b50d905b592d1fc4c8578) - Remove jogl.android-launcher.apk in favor of generic jogamp.android-launcher.apk - All Android test code resides in jogl.test.apk (initial launcher and delegated 'real' one)
* Adapt to gluegen Properties/Security commits ↵Sven Gothel2012-03-133-76/+18
| | | | f4ac27e177f6deb444280d3b375e7d343e38bd080 and eedb4b530fb83fc59a26962bcf7847a1404092a0
* Android: Minor cleanup ; NewtBaseActivity: clear static context at destroySven Gothel2012-03-102-1/+2
|
* AndroidWindow: Fix Native PixelFormat == VisualID { <0 case, TRANSLUCENCY, ↵Sven Gothel2012-03-101-73/+53
| | | | | | | | | | | | | | | | ..} ; Generate focus event/state; onTouch() consumed - fix Native PixelFormat == VisualID { <0 case, TRANSLUCENCY, ..} - surfaceChanged(..): use 'ANativeWindow_getFormat(surfaceHandle)' if given format is generic (<0) - match used caps w/ format exactly - generate focus event/state: always focus at creation and listen to onFocusChange() - onTouch() consumed only if we mapped a NEWT event, otherwise return false. - use VisualIDHolder of already chosen config to determine native VisualID - use Log.d(MD.TAG, ..)
* NEWT/setFullscreen(v): Save new state for to-be-created windows (not yet valid).Sven Gothel2012-03-101-11/+12
|
* AndroidWindow.surfaceChanged(.., int pFormat, ..): Use passed pixel-format ↵Sven Gothel2012-03-071-4/+8
| | | | | | | if valid Turns out on Android 4.0.3 / Pandaboard ES (at least), the NDK method 'ANativeWindow_getFormat()' returns '1'.
* NativeWindow public* reorg 3/3 ; NativeVisualID -> VisualIDHolder incl. ↵Sven Gothel2012-03-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | proper utilization. - VisualIDHolder: Update documentation (Exception case, etc) - NativeVisualID -> VisualIDHolder (public) - incl. generic Comparator - better doc and enum values - VID_UNDEFINED == 0 - methods shall not throw exception, but return UNDEFINED - CapabilitiesImmutable extends VisualIDHolder - All Capabilties impl. - use VID_UNDEFINED for undef. value - use final private (immutable) fields - AbstractGraphicsConfiguration extends VisualIDHolder - X11 CreateDummyWindow takes (int) visualID
* NativeWindow public-spec to public-impl reorg ↵Sven Gothel2012-03-0614-30/+46
| | | | (javax.media.nativewindow.<impl> -> com.jogamp.nativewindow.<impl>) 2/3
* Fix GLWindow/SWT-GLCanvas: set context synchronized ; Misc ChangesSven Gothel2012-03-051-0/+1
| | | | | | | | | | | | Fix GLWindow/SWT-GLCanvas: set context synchronized - GLWindow fix commit a0177c8a1048683e5d43f4712f8f9e37091d4e85. Removed explicit recursive surface lock requires recursive context locking, otherwise concurrent rendering fails. The implicit recursive surface lock within context makeCurrent() is applied after the context lock itself. Misc Changes - Fix TestPBufferDeadlockAWT, which was not using the unique profile string reference
* Complete LOCK_SURFACE_CHANGED ; Introduce NativeVisualID (Daisy chaining ↵Sven Gothel2012-03-053-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *GraphicsConfiguration) ; ... NativeVisualID: New interface for Capabilities implementations, allowing retrieval of the native 'visual id'. Impl. by WGL, X11 and EGL. JAWTWindow.lockSurface() - Detect surfaceHandle change an return LOCK_SURFACE_CHANGED (see: LOCK_SURFACE_CHANGED) EGLDrawable: - Impl. updateHandle() (see: LOCK_SURFACE_CHANGED) - use NativeVisualID for EGLGraphicsConfiguration selection to respect a native 'visual id' EGLContext.createContextImpl: Use NIO for attributes EGLDisplayUtil: Enhance eglGetDisplay w/ DEBUG code and NativeSurface / EGL_DEFAULT_DISPLAY variation EGL, XGL, WGL GraphicsConfiguration: - Don't set ALPHA_SIZE and STENCIL_SIZE if not requested in attribute list for context creation. - toString() shows proper identification, eg.: egl, x11, win32 .. EGLGraphicsConfigurationFactory: Daisy chain GraphicsConfigurationFactory for native device type (currently only X11). This allows choosing the EGLGraphicsConfiguration and hence native visual id based on EGL when invoked via the factory model (generic). In case EGLGraphicsConfigurationFactory is not suitable or doesn't produce a native visual id, it falls back the the original one. X11AWTGraphicsConfigurationFactory and X11Window: Use generic NativeVisualID which allows EGLGraphicsConfiguration implicit. *GraphicsConfiguration's DEBUG flag is pushed up to DefaultGraphicsConfiguration LOCK_SURFACE_CHANGED: - commit 006e9fe402a0a47b45fd2c4af51296aef895e8b5 - commit a0177c8a1048683e5d43f4712f8f9e37091d4e85 Impact: - Fixes EGL/GLES (wrapper/native) usage on X11, proper Xvisual selection w/ EGL - Fixes EGL/GLES (wrapper/native) usage on Windows, ANGLE works w/ NEWT and forced ES2
* NEWT/Windows lockSurfaceImpl(): Detect hdc change and result w/ ↵Sven Gothel2012-03-041-4/+19
| | | | | | | | LOCK_SURFACE_CHANGED This allows an underlying delegation/mapping to update the handles, eg.: EGLDrawable. See commit a0177c8a1048683e5d43f4712f8f9e37091d4e85
* NewtFactory: Since the platform string references are unique, let's just ↵Sven Gothel2012-03-044-20/+18
| | | | compare the references instead of a string compare
* NEWT/GLWindow.display(): No explicit surface locking/unlocking for ↵Sven Gothel2012-03-041-7/+2
| | | | | | | | | | GLDrawableHelper.invokeGL(..) - it's done implicit at makeCurrent()/release() The explicit locking takes away the locking result, eg. SURFACE_CHANGED, which is required to update the delegated drawable handles (e.g.: EGL surface handle). With the followup fix of EGLDrawable.updateHandle()'s recreate EGL surface, an EGL 'wrapper' can work on Windows (eg. ANGLE).
* NativeWindow: Relax Xinerama dependency / Rename Windows impl subfolder to ↵Sven Gothel2012-02-271-1/+1
| | | | | | | common name win32 (same as stub_include) Utilizing dlopen/dlsym in an efficient way relaxes the platform requirement of having Xinerama available. This allows using Nokia N9 MeeGo out of the box.
* ScreenMode/X11: Use common defaults in case of undefined values. X11: ↵Sven Gothel2012-02-272-9/+17
| | | | Tolerate invalid refresh rate and use default.
* NEWT Screen.getCurrentScreenModeIntern() !ScreenMode case: Attempt to get ↵Sven Gothel2012-02-261-0/+3
| | | | screen size if 0.
* NEWT/ScreenMode DEBUG_TEST_SCREENMODE_DISABLED ↵Sven Gothel2012-02-231-1/+6
| | | | (-Dnewt.test.Screen.disableScreenMode) - If set also avoid 'getCurrentScreenModeImpl()'