summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix for JOGL bug 629, and added new unit tests.rhatcher2012-11-296-2/+1258
| | | | | | | | | | | | | | | | | | | The change to AWTNewtEventFactory appears to fix the original issue for AWTCanvas instances, and the TestNewtEventModifiersAWTCanvas appears to work ok too. However, there are still issues with NewtCanvasAWT and NewtCanvasSWT instances. These might be problems in the test code, but there's also a good chance there are still issues in the NEWT event delivery infrastructure. For the time being I recommend that only TestNewtEventModifiersAWTCanvas be included in routine unit tests. The tests are defined in TestNewtEventModifiers, and the remaining test classes extend it to define how the window and associated GL drawing surface are created. File ModifierMappings.txt is simply informational, and shows how the modifier bits are laid out between AWT and NEWT. This possibly should have been a spreadsheet.
* X11Util/Xmisc setX11ErrorHandler: Force setting X11 error handler if invoked ↵Sven Gothel2012-11-272-23/+25
| | | | | | | | | from Java ensuring to overwrite other TKs handler SWT sets it's error handler, which exits application in case of an X11 error (e.g. n/a GL3 impl.). We need to allow overwriting it, hence allowing multiple calls (NEWT, GLContext). This patch also makes native NativewindowCommon_x11ErrorHandlerEnable(..) function static.
* SWTEDTUtil/AWTEDTUtil: Fix deadlock situations ; Cleanup ↵Sven Gothel2012-11-275-118/+240
| | | | | | | | | | TestNewtCanvasSWTBug628ResizeDeadlock - Fix deadlock situation in waitUntilStopped/Idle(), skip if on AWT/SWT EDT - Use RunnableTask for sync task invocation, don't block AWT/SWT EDT. - Cleanup TestNewtCanvasSWTBug628ResizeDeadlock (works on OSX as well)
* SWTAccessor: OS_gtk_widget_unrealize optional (SWT 4.3) ; decorate ↵Sven Gothel2012-11-263-10/+40
| | | | PrivilegedAction for static initSingleton block (SWTAccessor, NewtFactory, NativeWindowFactory)
* SWTEDTUtil/AWTEDTUtil: Fix deadlock situation in waitUntilStopped(), etc - ↵Sven Gothel2012-11-253-15/+25
| | | | | | wrap task execution (or enqueing) into status-sync 'edtLock' This fixes the disparity w/ DefaultEDTUtil, i.e. aligns it's implementation/semantics.
* FPSAnimator: Add note on deamon-thread and JVM shutdown behavior.Sven Gothel2012-11-252-5/+11
|
* Fix SWTEDTUtil Bug628: Perform NEWT event dispatching on SWT-EDT, due to ↵Sven Gothel2012-11-232-12/+14
| | | | | | possible triggered locking action, i.e. display(). Do the same for AWTEDTUtil. This fix actually clarifies the annotated FIXME :)
* Bug628: Adding unit test reproducing the deadlock realiable withing first ↵Sven Gothel2012-11-233-9/+370
| | | | | | | rounds of multi-threaded display. If a NEWT Window locking operation is performed from within NEWT's EDT (native event dispatch) and a mutable SWT operation performed via NEWT's display invoke - a deadlock occurs.
* Merge pull request #53 from HaZuki/FixQuaternionSpikeSven Gothel2012-11-211-2/+2
|\ | | | | | | | | | | Fix Bug : Quaternion multiplication unexpected behavior Matches description in Bug 631 https://jogamp.org/bugzilla/show_bug.cgi?id=636
| * Fix Bug : Quaternion multiplication unexpected behaviorHaZuki2012-11-161-2/+2
| |
* | OSX CALayer Stencil/.. Fix: In case of FBO CALayer usage, use default ↵Sven Gothel2012-11-219-66/+309
|/ | | | | | | | | | caps/pixelformat w/ chosen GLProfile only Using a pixelformat w/ chosen stencil for CALayer does corrupt rendering for an unknown reason, probably due to incompatible pixelformat w/ CALayer composition. This patch simply discards any special chosen caps, while only recognizing the desired GLProfile for the FBO CALayer pixelformat.
* NewtVersionActivity: Dump information in logcatSven Gothel2012-11-131-3/+7
|
* Frustum: Clarify method names, fix point/sphere classification, add used ↵Sven Gothel2012-11-122-26/+71
| | | | | | | | | references Clarify method names: - update(..) -> updateByPMV(..), updateByPlanes(..) - isOutside(AABBox) -> isAABBoxOutside(AABBox) - .. same for point/sphere, while adding 'Location classifyType(..)'
* Frustum: Add doc. about Frustum's Plane's normal orientationSven Gothel2012-11-121-2/+16
|
* Frustum: Cleanup / update; PMVMatrix: Fix mulPMVSven Gothel2012-11-122-13/+24
| | | | | | | | | | Frustum: Cleanup / update - Remove ctor w/ PMV, use update(..) instead - avoid API explosion - Add update(Plane[]) to copy existing Frustum planes - Mention world-coordinates in update(PMV) PMVMatrix: Fix mulPMV - P*Mv in column major order is correct for Frustum
* Frustum: Clarify isOutside(AABBox) impl, add isOutside for point and sphereSven Gothel2012-11-121-6/+43
|
* Adding Ref.: Frustum-Culling, Max WagnerSven Gothel2012-11-121-10/+12
|
* Validating Frustum w/ help of Eduard White [email protected], referencing ↵Sven Gothel2012-11-122-75/+139
| | | | | | | | | | | | | | | | | the original paper Paper: Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix http://graphics.cs.ucf.edu/cap4720/fall2008/plane_extraction.pdf Authors (in alphabetical order): Gil Gribb <[email protected]> Klaus Hartmann <[email protected]> 06/15/2001 Fix: - Column Major Order PMV (Passing to Frustum and in calculation itself) according to paper coeff. calculation of plane - Plane's signed distance function (only add d, don't multiply) - Normalization: divide by lenght, not multiply
* Frustum: Print Plane's normals properly in toString()Sven Gothel2012-11-111-1/+1
|
* Frustum: Passing Mv*P (column major order)Sven Gothel2012-11-112-34/+34
|
* Added a condition to skip updateGraphicsConfigurationARB when ↵jthedering2012-11-111-1/+2
| | | | non-hardware-accelerated capabilities are requested, because only updateGraphicsConfigurationGDI provides software rendering capabilities.
* Fix Graph SceneUIController: Remove Listener by itself in dispose()Sven Gothel2012-11-112-3/+3
|
* GLDrawableHelper disposeAllGLEventListener(): Don't use cached listener size ↵Sven Gothel2012-11-111-3/+2
| | | | / check size() > 0, since List can be modified by listener itself
* PMVMatrix: Add 'Frustum glGetFrustum()' adding same dirty/request ↵Sven Gothel2012-11-112-67/+114
| | | | | | | | | methodology as for Mvi and Mvit Allows user to derive Frustum from updated P + MV Clarify method name for clearing all update request: - disableMviMvitUpdate() -> clearAllUpdateRequests()
* Frustum: Simpler usage (ctor, update) no need for explicit compute() method. ↵Sven Gothel2012-11-111-102/+143
| | | | Don't store passing PMV reference. isInside() -> isOutside()
* AABBox: Add public direct setSize(..), skipping redundant reset() / resize(..)Sven Gothel2012-11-111-18/+31
|
* Cleanup Frustum Math Util: Independent / Compile Clean / Relocation ; ↵Sven Gothel2012-11-113-191/+194
| | | | | | | | | | | | PMVMatrix: Add getPreMultipliedPMV(..) - Independent / Compile Clean - Remove OpenMALI dependencies - Use basic float[] type and FloatUtil - Use AABBox - FIXME: May need BBox (no axis alignment ?!) - Relocation - Move to com.jogamp.opengl.math.geom (see commit 5fafc1ac360333645b807dcd8dff0c0a655ea439)
* Reorganize math code into: com.jogamp.opengl.math and ↵Sven Gothel2012-11-1134-89/+264
| | | | | | | | | | | | | | | | | | | | | | | com.jogamp.opengl.math.geom packages Note: WIP - We may relocate / reorg math package. Public relocations: com.jogamp.opengl.util -> com.jogamp.opengl.math - FixedPoint - FloatUtil com.jogamp.graph.math -> com.jogamp.opengl.math - Quaternion - VectorUtil com.jogamp.graph.geom -> com.jogamp.opengl.math.geom - AABBox VectorUtil: Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances to be used 'graph' agnostic and to document 2d/3d use-cases.
* Merge MathFloat into FloatUtilSven Gothel2012-11-116-95/+68
|
* Fix Bug 636: Quaternion multiplication unexpected behaviorTek2012-11-111-4/+4
|
* Adding basic Frustum utility class interfacing w/ PMVMatrix. Still depending ↵Eduard White2012-11-111-0/+191
| | | | on OpenMALI - hence broken.
* Bug 634 - Part 1: Fix FBObject regression of commit ↵Sven Gothel2012-11-081-4/+12
| | | | | | | | | | dbc260bd2e917ee9001461749c99da0c9cbfaf9a - init(..): Query MAX_COLOR_ATTACHMENTS: Remove erroneous samplingSink null check (it's always null) - reset(..): Create & construct samplingSink if required and missing before detaching all (due to bind) - setSamplingSink(..) returns previous samplingSink
* Fix GLAutoDrawable.dispose(): Dispose drawable even w/o context; ↵Sven Gothel2012-11-089-269/+334
| | | | | | | | | | | | | | | | | | | JAWTWindow.lockSurface(): Check AWT component's native peer - Fix GLAutoDrawable.dispose(): Dispose drawable even w/o context - It is possible to have the GLContext not being created (not made current), so drawable shall be disposed independent. - Merge Runnable 'postDisposeOnEDTAction' to dispose Runnable for clarity - GLDrawableHelper: Split disposeGL from invokeGLImpl for clarity - JAWTWindow.lockSurface(): Check AWT component's native peer - W/o a native peer (!isDisplayable()), JAWT locking cannot succeed. - On OSX OpenJDK 1.7, attempting to JAWT lock a peer-less component crashes the VM - MacOSXJAWTWindow.lockSurfaceImpl(): Remove redundant null checks
* FBObject: Rename private fields for better reading: samplesSink* -> ↵Sven Gothel2012-11-061-65/+65
| | | | samplingSink*
* Bug 634 - Part 1: FBObject, Make MSAA 'samplingSink' mutable and add ↵Sven Gothel2012-11-061-10/+33
| | | | setSamplingSink(..). Create MSAA samplingSink lazy if null.
* GLFBODrawableImpl: Following suit w/ commit ↵Sven Gothel2012-11-061-1/+1
| | | | | | | b83b068c0f426f24a58e2bd9f52de9ebd0c7876d, sync GL command stream before FBO reconfig Even though we currently have no bug experienced on this, it seems to be a good idea for highly concurrently GL driver implementations.
* Fix GLDrawableHelper.recreateGLDrawable(..): Sync GL command stream before ↵Sven Gothel2012-11-061-4/+9
| | | | | | | destruction of drawable Lack of finishing the GL command stream lead to a SIGSEGV on Windows w/ Nvidia driver where probably pending GL commands were still being processed concurrently.
* TestGLCanvasAWTActionDeadlock0[01]AWT: Disable 'restart' test on current ↵Sven Gothel2012-11-052-2/+4
| | | | | | (non AWT) thread - crashes on solaris (which is fine) Modifying AWT components shall always happen on AWT-EDT anyways.
* GLAutoDrawable: Refine API change of commit ↵Sven Gothel2012-11-058-55/+94
| | | | | | | | | | c002e04f848116922a1ed7bd96ead54961649bbd As suggested by Julien Gouesse, align 'enqueue(..)' method w/ 'invoke(..)': - public void enqueue(GLRunnable glRunnable); + public boolean invoke(boolean wait, List<GLRunnable> glRunnables);
* Analyzed OSX Deadlock w/ AWT Applet & CALayer: Andres Colubri's Test Case, ↵Sven Gothel2012-11-052-55/+127
| | | | | | | | | | | | | | | | | | | | | | Commit 77db6a5c22cb4a53cf911b4caf57127770c70968 [1] - The AWT/Applet test case on OSX utilized offscreen CALayer, which is correct. [2] - the GLEventListener.display(..) method calls Frame.setTitle(".."); which is correct, but freezes when called right after GLEventListener.init(..) BUG on OSX/CALayer: If frame.setTitle() is issued right after initialization the call hangs in at apple.awt.CWindow._setTitle(Native Method) at apple.awt.CWindow.setTitle(CWindow.java:765) [1.6.0_37, build 1.6.0_37-b06-434-11M3909] Happens w/ Oracle's JRE7u9 as well! Workaround: - Set 'justInitialized' flag in GLEventListener.init(..) - Clear 'justInitialized' flag in GLEventListener.display(..) at the end - Skip Frame.setTitle(..) in GLEventListener.display(..) if 'true == justInitialized' Somebody may send a bugreport to Oracle / OpenJDK.
* TestGLCanvasAWTActionDeadlock01AWT: Reproducing OSX deadlock variation, ↵Sven Gothel2012-11-041-0/+259
| | | | using Applet as component which provokes offscreen FBO layer.
* TestGLCanvasAWTActionDeadlock00AWT: Remove redundant argumentSven Gothel2012-11-041-3/+3
|
* TestGLCanvasAWTActionDeadlock01AWT -> TestGLCanvasAWTActionDeadlock02AWT; To ↵Sven Gothel2012-11-041-7/+7
| | | | add another intermediate unit test for analysis
* Adding Andres Colubri's Test Case (junit'fyed), which provokes a Deadlock on ↵Sven Gothel2012-11-042-0/+844
| | | | | | | | | | | | | | | OSX - Adding a similar one w/o deadlock and less framework bits. Andres Colubri reported a test case in the forum: <http://forum.jogamp.org/Thread-blocking-issue-with-AWT-but-not-NEWT-on-OSX-td4026674.html> Which is now included as TestGLCanvasAWTActionDeadlock01AWT. A similar w/ less framework bits and w/o dealock is also included as TestGLCanvasAWTActionDeadlock00AWT. A followup commit will incl. a fix after further analysis. A commit at this point where TestGLCanvasAWTActionDeadlock01AWT still freezes on OSX is done to be able to reproduce the bug and see the fix as a patch.
* GLDrawableUtil.swapGLContextAndAllGLEventListener(..): Add glFinish() before ↵Sven Gothel2012-11-041-17/+36
| | | | | | and after ctx/drawable swap - sync'ing GL state Otherwise a driver crash may occur on Windows/NVidia.
* FPSAnimator: Wait '2 x period' or 20ms, whichever is greater in case of ↵Sven Gothel2012-11-041-5/+7
| | | | pause/stop - taking execution frequency into account
* GLAutoDrawable: Fix GLEventListener lifecycle and expose more user control ↵Sven Gothel2012-11-0411-196/+868
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (API Change) ; Added GLDrawableUtil A GLEventListener resides in two states, initialized and uninitialized. When added to a GLAutoDrawable, it is uninitialized. A first 'display()' will issue GLEventListener's 'init(..)' which renders it initialized. This is usually accompanied by 'reshape(..)' propagating the drawable's dimension. Destruction of the GLAutoDrawable will issue GLEventListener's 'dispose(..)' which renders it uninitialized. It turns our these means of GLEventListener controls are not sufficient in case the user requires to remove and add them during the lifecycle and rendering of their GLAutoDrawable host. GLAutoDrawable 'removeGLEventListener(..)' merely removes the GLEventListener from the list, but does not complete it's lifecycle, i.e. issues 'dispose(..)' if initialized to realease GL related resources. Hence the following essential API changes are made to complete the lifecycle: + public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove); disposing a single GLEventListener, allowing it's removal from the list being optional This is demonstrated via GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b), see below. ++++++++ Further more the following API changes were made to expose complete control of GLEventListener to the user: - public void removeGLEventListener(GLEventListener listener); + public GLEventListener removeGLEventListener(GLEventListener listener); The return value allows simple pipelining, and also delivers information whether the passed listener was actually removed. - public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException; + public int getGLEventListenerCount(); + public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException; Dropping the redundant removal by index, while adding count and get methods. + public boolean getGLEventListenerInitState(GLEventListener listener); + public void setGLEventListenerInitState(GLEventListener listener, boolean initialized); Allows retrieving and setting of listener states. All in all these API changes allows a user to experience all freedoms in dealing w/ GLEventListeners hosted by GLAutoDrawable impl. and shall be future proof. Note that we have avoided the Iterator pattern due to it's overhead of temporal objects creation. The simple indexed access allows us to implement each method as an atomic operation. +++++++++++ Further more a simple enqueue(..) method has been added, allowing to just enqueue a GLRunnable w/o provoking it's execution - as invoke(..) does. This method pleases a use case where GLRunnables are batched and shall be executed later on.. public boolean invoke(boolean wait, GLRunnable glRunnable); + public void enqueue(GLRunnable glRunnable); +++++++++++ Added GLDrawableUtil, exposes utility function to rearrange GLEventListener, modifiy GLAutoDrawable, etc. GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b) is tested and demonstrated w/ TestGLContextDrawableSwitchNEWT. Manually tested on X11, OSX and Windows.
* MacOSXCGLContext[NSOpenGLLayer/NSView]: Propagate drawable changeSven Gothel2012-11-046-26/+73
| | | | | | | Propagate drawable change to MacOSXCGLContext where either context/NSView or context/NSOpenGLLayer association needs to get updated. Fixes drawable/context switch.
* NEWT KeyEvent API doc: Document Windows shift+non-uppecase_char, commit ↵v2.0-rc11Sven Gothel2012-10-311-1/+8
| | | | c135d638fe820457977747e3d45960da64038d53
* NEWT Windows KeyEvent: We have to store the keyChar for typed events, since ↵Sven Gothel2012-10-312-3/+13
| | | | | | keyChar from pressed/released may be wrong (Uppercase: SHIFT-1, etc ..) Partially reverts commit: b62e1d027c289877686d6008ea8dd40e4e1541ec