aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* FBObject.init() uses safe 1x1 size like reset(..) to behave equal; ↵Sven Gothel2013-04-122-22/+23
| | | | GLFBODrawableImpl.contextMadeCurrent(ctx, true): Throw exception if !initialized
* GLContextImpl: destroy(): Fix null drawable check; makeCurrentWithinLock(): ↵Sven Gothel2013-04-122-24/+58
| | | | | | | | | | | | | | | | | | | | | | | | Add drawable size validation before attempt to create context; MacOSXCGLContext: Explicit exception for Null AttachGLLayerCmd. GLContextImpl: - destroy(): - Fix null drawable check Only if the GLContext isCreated(), we require a drawable to be set. - Proper name of associateDrawable Exception - makeCurrentWithinLock(): - Add drawable size validation before attempt to create context. - 'makeCurrent()' shall never be called w/o proper sized drawable, i.e. > 0x0. - returns CONTEXT_NOT_CURRENT, if drawable size is <= 0x0 MacOSXCGLContext: - Explicit exception for Null AttachGLLayerCmd. In case context creation has failed via makeCurrent(), AttachGLLayerCmd may never been issued and hence maybe NULL. Catch this case and send a meaningful exception, which is catched and fwd in GLContext.destroy().
* Bug 697: Fix commit 4db745e84fac610f85ab085e5c147e571e82e008 - Not compile ↵Sven Gothel2013-04-111-31/+36
| | | | | | | | | | | | | clean! Also brought back my safe showCursor logic. The code was not compile clean: - declaration after use w/o prototype! - missing var declaration 'success'! - 'pointerVisible=0', instead of 'wud->pointerVisible=0' var. not found! Used my old safe show cursor logic, while removing the max count, which was redundant, since we can check whether the counter moves in the right direction.
* NEWT/WindowsWindow.c: Simplify pointerVisible branch for calling ↵Sven Gothel2013-04-111-7/+2
| | | | SafeShowCursor(..)
* Merge remote-tracking branch 'gouessej/master'Sven Gothel2013-04-112-29/+167
|\
| * Adds the missing fileJulien Gouesse2013-04-061-29/+53
| |
| * Adds a unit test and a fix for the bug 697Julien Gouesse2013-04-051-0/+114
| |
* | LinuxEventDeviceTracker: Reapply changes from commit ↵Sven Gothel2013-04-111-4/+4
| | | | | | | | b13868b612689307ebf4e46ee4ede2fd0560e504, which got lost via my merge conflict resolution (duh).
* | Merge remote-tracking branch 'xranby/NEWT-input'Sven Gothel2013-04-111-762/+831
|\ \ | | | | | | | | | | | | Conflicts: src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java
| * | LinuxEventDeviceTracker: ALT, ALT_GRAPH & CTRL modifiers.Xerxes Rånby2013-04-091-4/+37
| | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * | LinuxEventDeviceTracker: 4 space indentationXerxes Rånby2013-04-091-798/+798
| | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * | LinuxEventDeviceTracker: shift-modifierXerxes Rånby2013-04-091-27/+63
| | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | | Merge remote-tracking branch 'hharrison/master'Sven Gothel2013-04-1122-0/+0
|\ \ \
| * | | jogl: remove executable bit from some java files and a pngHarvey Harrison2013-04-0922-0/+0
| |/ / | | | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
* | | NEWT KeyEvent: Use UTF-16 UniCode for key-code and key-symbol exposing well ↵Sven Gothel2013-04-1117-916/+1446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined key encoding and simplify usage. Note, we use one collision to reduce key-code range: [0x61 .. 0x78] keyCodes [F1..F24] collide w/ ['a'..'x'] Since keyCode/Sym won't use lower capital a-z, this is a no isssue. KeyEvent: - 'printable' type is being determined by a nonPrintableKeys table, while 'action' type is set in case !printable and !modifier. - public ctor hidden, use create(..) method instead. This allows us to ensure modifier bit are properly set (incl. the keySym one) w/o performance loss. - ctor validates that only one of the type flags is set, printable, modifyable or action. WindowImpl: - Using IntBitfield of 255 bits to track pressed state, while removing the repeat state tracking since it is redundant. The Windows impl. uses a single field to validate whether a key was already repeated or not. - Properly cast keyCode short values to int for tracking! AWTNewtEventFactory, SWTNewtEventFactory: - Add translation of keyCode/Sym from and to NEWT - All tested via: - Newt -> Awt for AWTRobot - OSX CALayer: AWT -> NEWT - SWT tests X11: - Add VK_CONTEXT_MENU mapping (XK_Menu) LinuxEventDeviceTracker: - Fix apostrophe and grave mapping, i.e. to VK_QUOTE and VK_BACK_QUOTE. Adapted all unit tests, especially: - TestNewtKeyCodesAWT: More fine grained keyCode ranges to test using proper keyCode symbols.
* | | GLContextImpl.destroy(): Fail fast in case of invalid dawable [null, ↵Sven Gothel2013-04-101-14/+21
| | | | | | | | | | | | !realized] and makeCurrent() failure.
* | | GLDrawable: Refine API doc; GLDrawableImpl: Balance ↵Sven Gothel2013-04-105-55/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | createHandle()/destroyHandle(); Handle LOCK_SURFACE_CHANGED in lockSurface() ; GLContextImpl.makeCurrent(): Fix drawable handle validation. GLDrawable: Refine API doc (realized/handle) - Lifecycle of the drawable handle was not clear - Ephasizing handle's dependency on NativeSurface's lock state and drawable's realization GLDrawableImpl: Balance createHandle()/destroyHandle() - updateHandle() -> createHandle() - ensure both are balance, see below GLDrawableImpl: Handle LOCK_SURFACE_CHANGED in GLDrawableImpl's lockSurface() - call destroyHandle() and createHandle() GLContextImpl.makeCurrent(): Validate drawable handle if realized only. - it is valid to have an invalid drawable handle if not realized (see above)
* | | Debug Messages: Unify getThreadName() usage and 'Catched Exception' messagesSven Gothel2013-04-1020-64/+64
|/ /
* | Fix Bug 703: Quaternion slerp function. Disclaimer: Not tested / No unit test.Harvey Harrison2013-04-091-30/+39
| |
* | Bug 641 NEWT: Refine definition of keySym, i.e. for printable keys, keySym ↵Sven Gothel2013-04-081-1/+6
| | | | | | | | is the 'unshifted' UTF-16 char value ; Add isPrintable() to toString().
* | Bug 641 NEWT/OSX Deliver keySym, derived from the current layout's ↵Sven Gothel2013-04-084-12/+171
| | | | | | | | lower-case UTF-16 character.
* | NEWT KeyEvent: More tight definition of isPrintable(), i.e. must have ↵Sven Gothel2013-04-083-16/+26
| | | | | | | | defined keyCode [and keyChar]; VK_KEYBOARD_INVISIBLE -> isActionKey
* | NEWT/OSX: Remove USE_SENDIO_DIRECT conditional compilation, by now it's ↵Sven Gothel2013-04-081-25/+2
| | | | | | | | clear we need to enqeue the events
* | Bug 641 NEWT/X11: Deliver 'J_VK_WINDOWS'; keySym is layout independent for ↵Sven Gothel2013-04-081-3/+16
| | | | | | | | dead-keys (zero keyChar); For 'unshifted' keySym's also unmask Ctrl and Mod* states
* | NEWT/Native: NewtCommon_GetJNIEnv(..) adding 'asDaemon' flag, used by all ↵Sven Gothel2013-04-083-30/+35
| | | | | | | | OSX JNI attachments to save time since detachment is skipped.
* | Bug 641 NEWT: X11 Deliver keyCode layout independent, keySym layout ↵Sven Gothel2013-04-084-30/+80
| | | | | | | | | | | | | | | | | | | | dependent and UTF-16 keyChar value On X11, the layout dependent keySym was not delivered [1], as well as the UTF-8 to UTF-16 translation was missing [2]. [1] is solved using XLookupString w/o ShiftMask [2] is solved using JNI's NewStringUTF, which takes UTF-8.
* | Bug 709: Testing texured demo w/ FBO, comparing w/ onscreen - No corruption.Sven Gothel2013-04-062-0/+283
| |
* | Bug 678: Differentiate ALT (left) and ALT_GRAPH (right) on X11, EventDev, ↵Sven Gothel2013-04-066-28/+51
| | | | | | | | | | | | | | Windows and OSX - X11: Memorize pressed Alt_R to decide which 'alt' has to be used for non key modifier fetching - Windows: Only use GetKeyState(..) and compare the US vkey, since int. kbd layout use reduced scancode
* | TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT: Wrong test comment, no NEWT involvedSven Gothel2013-04-061-3/+0
|/
* Bug 707: Fix NEWT EVENT_MOUSE_EXITED not sent on Windows - Regression of ↵Sven Gothel2013-04-052-10/+20
| | | | | | | commit 85338858f5c58694fa88e77df1386d0556887944 Commit replaced enqueueMouseEventID w/ sendMouseEventID, while not removing the 'jboolean wait' argument. This also lead to staying in DRAGGED mode when mouse left the window.
* Bug 713: Handle broken EGL setup - Catch all Exception types, not only ↵Sven Gothel2013-04-054-10/+5
| | | | | | | | | | JogampRuntimeException at *DrawableFactory* instantiation trial In case EGL is not completly installed, EGLDisplayUtil.eglGetDisplayAndInitialize(..) will throw a GLExeception which was not catched in GLDrawableFactory. The latter only catched JogampRuntimeException caused by ReflectionUtil due to n/a classes, but the actual initialization code is capable to throw others.
* SWT unit tests: Sort w/ AWT and Headless - Fix threading w/ AWT.Sven Gothel2013-04-043-17/+24
| | | | This especially impacts (fixes) Mac OSX.
* OSX CALayer Unit Tests: NEWT child is destroyed if NewtCanvasAWT is ↵Sven Gothel2013-04-044-8/+35
| | | | disposed/removed, due to offscreen/onscreen transition
* OSX CALayer/NewtCanvasAWT: Force relayout of component (size +1, size -1) ↵Sven Gothel2013-04-044-19/+81
| | | | when attaching NEWT Child to avoid false CALayer position.
* OSX/CALayer Threading Part4: Stream all JAWT Root CALayer Operations on OSX ↵Sven Gothel2013-04-044-120/+95
| | | | | | | | | | | | Main-Thread Previous code created, set and unset the root CALayer on the current thread, which lead to a very delayed destruction of the root CALayer w/. With Java7 this lead to a possible resource starvation in certain situations, since Java7 uses an CAOpenGLLayer. Similar w/ f354fb204d8973453c538dda78a2c82c87be61dc, creation, set and unset is operated on main-thread.
* JAWTWindow: Issue component.repaint() after attachSurfaceLayer(..), ↵Sven Gothel2013-04-031-1/+1
| | | | otherwise no rendering result might be visible w/o Animator
* OSX CALayer minor edit: Call [super setFrame..] directlySven Gothel2013-04-031-1/+2
|
* NewtCanvasAWT: Cleanup up private method calls; Attach/Detach JAWTWindow's ↵Sven Gothel2013-04-031-12/+9
| | | | SurfaceUpdateListener to NEWT Window when it gets attached/detached.
* Fix Bug 671: Add JPEG Decoder w/o AWT DependenciesSven Gothel2013-04-0118-20/+2589
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original JavaScript code from <https://github.com/notmasteryet/jpgjs/blob/master/jpg.js>, author 'notmasteryet' <async.processingjs at yahoo.com>. Ported to Java. Enhancements: * InputStream instead of memory buffer * User provided memory handler * Fixed JPEG Component ID/Index mapping * Color space conversion (YCCK, CMYK -> RGB) * More error tolerant +++ Features: JOGL AWT RGB ok ok YCCK ok Exception CMYK ok Exception YUV Store ok n/a Need Y-Flip no yes +++ Benchmark: TestJPEGJoglAWTBenchmarkNewtAWT JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l AWT..... Loops 100, dt 2144 ms, 21.44 ms/l File: jogl/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/j1-baseline.jpg Machine: GNU/Linux PC (AMD 8 core), JavaSE 6 (1.6.0_38) .++++ UITestCase.setUp: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark libEGL warning: DRI2: failed to authenticate 0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS RGB, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]] 0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166] JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l 0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS YCbCr, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]] 0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166] JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l 0: TextureData[261x202, y-flip true, internFormat 0x1907, pixelFormat 0x80e0, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 261, buffer java.nio.HeapByteBuffer[pos=0 lim=158166 cap=158166] AWT..... Loops 100, dt 2144 ms, 21.44 ms/l ++++ UITestCase.tearDown: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
* NewtBaseActivity: Move setVisible(false) from onPause() -> onStop(), since ↵Sven Gothel2013-03-291-4/+4
| | | | only onStop() declares invisible status. onPause() could imply other non fullscreen activity on top.
* Adapt to new version scheme, see GlueGen ↵Sven Gothel2013-03-283-7/+10
| | | | | | | a3f2ef50ad33c58a240a17fcf03e415d772207c3, etc; Fix NewtVersion, NativeWindowVersion and NewtVersionActivityLauncher NewtVersion, NativeWindowVersion: Also search for extension javax.media.opengl (all packaging) NewtVersionActivityLauncher: Use new launcher URI
* NEWTGearsES2Activity*: Adding property to enable 'process kill' behavior ↵Sven Gothel2013-03-282-1/+37
| | | | (memory and killSelf)
* NewtBaseActivity: Perform cleanup() even on onCreate() due to possible call ↵Sven Gothel2013-03-281-10/+55
| | | | | | w/ initialized states (App process is killed for memory exhaustion etc) .. even though I was not able to reproduce this case, it will not harm.
* GLStateKeeper: Add clearPreservedGLState()Sven Gothel2013-03-282-3/+21
|
* Complete 9a4fcc7ea4ec61e4ceed791acced734ac04ea270: ↵Sven Gothel2013-03-271-3/+0
| | | | SharedResourceRunner.Impl.createSharedResource(..): isGLXAvailableOnServer(..) call redundant since checked upfront at isDeviceSupported(..)
* SharedRessourceRunner: Add isDeviceSupported(..) query before spawn off ↵Sven Gothel2013-03-273-2/+31
| | | | thread, allowing a more gracefull detection of n/a GLX on X11
* PNGImage: Add license header ; TestPNGImage01NEWT package move ..Sven Gothel2013-03-272-2/+28
|
* Unit Tests: Unify 'AWT Robot Key Press/Release', waitForIdle, action, delay, ↵Sven Gothel2013-03-273-13/+26
| | | | waitForIdle ; TestFocus0*: Wait until closed after win.destroy().
* NEWTEvent: Fix toString message - add commaSven Gothel2013-03-261-1/+1
|
* GLJPanel: Refine API docSven Gothel2013-03-261-8/+15
|