aboutsummaryrefslogtreecommitdiffstats
path: root/make
Commit message (Collapse)AuthorAgeFilesLines
* Adding GEOMETRY_SHADER support in ShaderCode, adding core ↵Sven Gothel2013-01-121-1/+3
| | | | | | | | | | | | | | | | | | | GL3/GEOMETRY_SHADER unit tests. ; Simplified GLContext version number - Adding GEOMETRY_SHADER support in ShaderCode, adding core GL3/GEOMETRY_SHADER unit tests Chuck Ritola reported in December 2012 that we lack support of GEOMETRY_SHADER and he provided a test case. The latter is cleaned up to use GL3 core profile features only tesing a pass-through and the flip-XYZ geometry shader. ShaderUtil is fixed. - Simplified GLContext version number The OpenGL major/minor version is now hold in a VersionNumber instance to simplify usage. Also expose it via getGLVersionNumber() while marking getGLVersionMajor() and getGLVersionMinor() deprecated.
* build/test: newt-headless shall exclude AWT/SWTSven Gothel2013-01-111-0/+2
| | | | TestNewtEventModifiersNEWTWindowAWT was incl. in newt headless
* GLAutoDrawable/AnimatorBase: Add ExclusiveContextThread (ECT) feature; ↵Sven Gothel2013-01-112-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AnimatorBase: Add setModeBits/MODE_EXPECT_AWT_RENDERING_THREAD; FPSAnimator: Make transactions deterministic. ExclusiveContextThread (ECT) allows user to dedicate a GLContext to a given thread. Only the ECT will be allowed to claim the GLContext, hence releasing must be done on the ECT itself. The core feature is accessible via GLAutoDrawable, while it can be conveniently enabled and disabled via an AnimatorBase implementation. The latter ensures it's being released on the ECT and waits for the result. Note that ECT cannot be guaranteed to work correctly w/ native (heavyweight) AWT components due to resource locking and AWT-EDT access. This is disabled in all new tests per default and noted on the API doc. Note: 'Animator transaction' == start(), stop(), pause(), resume(). - Add ExclusiveContextThread (ECT) feature - GLAutoDrawable NEW: - Thread setExclusiveContextThread(Thread t) - Thread getExclusiveContextThread() - AnimatorBase NEW: - Thread setExclusiveContext(Thread t) - boolean setExclusiveContext(boolean enable) - boolean isExclusiveContextEnabled() - Thread getExclusiveContextThread() - AnimatorBase: Add setModeBits/MODE_EXPECT_AWT_RENDERING_THREAD Allows user to pre-determine whether AWT rendering is expected before starting the animator. If AWT is excluded, a more simple and transaction correct impl. will be used. - FPSAnimator: Make transactions deterministic. FPSAnimator previously did not ensure whether a transaction was completed. A deterministic transaction is required to utilize ECT. FPSAnimator now uses same mechanism like Animator to ensure completeness, i.e. Condition and 'finishLifecycleAction(..)'. Both are moved to AnimatorBase. Tested manually on Linux/NV, Linux/AMD, Windows/NV and OSX/NV. - All new tests validated correctness. - All new tests shows an performance increase of ~3x w/ single GLWindow, where multiple GLWindows don't show a perf. increase.
* Update PNGJ 0.85 -> 1.12 (w/ interlace read support) ; Added PNG Interlace ↵Sven Gothel2012-12-311-2/+2
| | | | read tests (TestPNGTextureFromFileNEWT)
* Enhance PMVMatrix: Use FloatStack to implement PushMatrix and PopMatrix (Bug ↵Sven Gothel2012-12-311-3/+3
| | | | | | | | | | | | | 657) One FloatStack for each, MV, P and T, with initialialSize zero to save memore and growSizes: MV = 16 arrays, P = 2 arrays, T = 2 arrays, with array = 16 floats. This shall save performance due to the preallocated stack when used and growing only in the above mentioned grow intervals. We may finetune the growSize, if required.
* Bug632: Test NEWT Child Window Translucency (X11/Windows) ..Sven Gothel2012-12-304-28/+39
| | | | | | | | | | | | | - Windows: Child window is not translucent at all - X11: Child window is translucent to parent's background, however - parents content is _not_ 'composed in'. - TODO: Find whether there is a solution or not. - Note: The child window does not change it's rel. position if parent moves! This is a feature, since we don't have impl. a layout.
* Cleanup / Simplify: setGLFunctionAvailability(..) / ↵Sven Gothel2012-12-301-1/+1
| | | | | | | | | | createContextARBVersions(..) GL Version Validation String or integer based GL version validation now happens in setGLFunctionAvailability(..) depending on the requested profile. Due to the 'strictMatch' argument the method fails early when unsatisfied also allowing to simplify createContextARBVersions(..) implementation.
* Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only) ; No ↵Sven Gothel2012-12-291-2/+4
| | | | | | | | | | | | | | | | | | | PROFILE_ALIASING compat -> core ; Fix setGLFunctionAvailability(..) failure path @ profile query - Add GLRendererQuirks.GLNonCompliant, marking a GL context/profile non compliant. Currently: 'Mesa DRI Intel(R) Sandybridge Desktop' && 3.1 compat profile - Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only) Detect case using new GLRendererQuirks.GLNonCompliant in setGLFunctionAvailability() and return 'false'. - No PROFILE_ALIASING compat -> core Use true core GL profiles / context if available to ensure proper API behavior across platforms due to different functionality. E.g. don't use GL3bc if GL3 is requested. - Fix setGLFunctionAvailability(..) failure path @ profile query Destroy temp context & zero result to cont. iterating through GL versions. This missing cleanup lead to returning the faulty GL context handle and it's mapping/usage.
* Adapt change of commit d93c5d23e304ea20e868595748f92a5bef4f5703 to unit test ↵Sven Gothel2012-12-291-2/+2
| | | | (GLCanvas realization point)
* adb-launch-main.sh: ANDROID_SDK_HOME -> ANDROID_HOMESven Gothel2012-12-271-2/+2
|
* Android build scripts: Fix env. name ANDROID_SDK_HOME -> ANDROID_HOMESven Gothel2012-12-272-20/+20
| | | | | | | | Intuitively I assumed ANDROID_SDK_HOME to be pointing to the SDK root dir, however this is not true: Semantics by Android tools are: ANDROID_SDK_HOME - Users ~/.android folder ANDROID_HOME - SDK root folder
* Test*NewtEventModifiers*: Clear 'clearing' events on thread - @Before/@After ↵Sven Gothel2012-12-251-2/+2
| | | | | | -> execOffThreadWithOnThreadEventDispatch Remaining 'clearing' events from _releaseModifiers() and escape() broke test case.
* Misc OSX/SWT: OSXUtil.RunOnMainThread(..) refinement; Fix ↵Sven Gothel2012-12-251-1/+1
| | | | | | | | | | | | | | | | | Test*NewtEventModifiers for SWT (TestNewtEventModifiersNewtCanvasSWT) - Misc OSX/SWT: OSXUtil.RunOnMainThread(..) refinement - 'waitUntilDone' is implemented on Java site via lock/wait on RunnableTask to not freeze OSX main thread. - Fix Test*NewtEventModifiers for SWT (TestNewtEventModifiersNewtCanvasSWT) - Deal with SWT's requirement to run the SWT event dispatch on the TK thread, which must be the main thread on OSX. We spawn off the actual test-action into another thread, while dispatching the events until the test-action is completed. - AWTRobot: Add 'void requestFocus(Robot robot, Object obj, int x, int y)' - Use waitForIdle() only if programmed in Robot (Deadlock w/ OSX SWT) - Required for SWT usage (see above)
* WT-NEWT Modifier mapping and test: part-4 (Fix unit tests): ↵Sven Gothel2012-12-242-2/+3
| | | | BaseNewtEventModifiers ignore more events (clicked, wheel, entered, exited); Fix TestNewtEventModifiersNewtCanvasSWT SWT-Display thread.
* AWT-NEWT Modifier mapping and test: part-3 (Fix unit tests)Sven Gothel2012-12-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | - Finetune delay - Wait for eventCount - Fix Listener concurrency - Manually tested (enabled in our unit tests now) - Tool Combinations - NEWT GLWindow - AWT GLCanvas - NewtCanvasAWT - NewtCanvasSWT - On - Linux/X11 - Windows - OSX(+) (+): Failure NEWT: When multiple buttons are pressed, only the last one is visible via modifier MASK. "expected:[button1, button2], have: [button2]"
* AWT-NEWT Modifier mapping and test: part-3 (NEWT BUTTON MASK always, ..)Sven Gothel2012-12-242-12/+19
| | | | | | | | | | | | | | | | - AWTNewtEventFactory's awtModifiers2Newt: - always include NEWT BUTTON_MASK (press, release, ..) where AWT doesn't include them at release (it's only a DOWN_MASK). - Test BaseNewtEventModifiers, .. - No need to call super class Before, BeforeClass, .. manually - Use RedSquareES2 as GL demo - Adapt to AWTNewtEventFactory's modifier change above (NEWT BUTTON MASK even at release) - More descriptive error/log text - Added _mandatory_ TestNewtEventModifiersNEWTWindowAWT to test native NEWT behavior. This shall be the golden behavior all translated events shall compare w/.
* Bug 642 / Refine 1ae0737f34143a5ed655bd9c4d5fe9b0437c7774: ↵Sven Gothel2012-12-221-2/+2
| | | | | | | GLCanvas.displayOnEDT: Also check null!=drawable As for 1ae0737f34143a5ed655bd9c4d5fe9b0437c7774, an animator may inject a display Runnable on the EDT before AWT destruction. In case this Runnable is executed after destruction on the EDT - it would fail.
* Fix regression of commit b8a8fc24a3afb0cb06a31504bdea1a98b8f00ef4: Cache ↵Sven Gothel2012-12-223-5/+5
| | | | ShaderState for share ctor.
* Fix Bug 642 TestJSplitPaneMixHwLw01AWT (AWT-GLCanvas); Robustness ↵Sven Gothel2012-12-223-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | GLContext/GLDrawable - Fix Bug 642 TestJSplitPaneMixHwLw01AWT On Windows platform when mixing hw/lw JSplitPanel, the GLCanvas is removed and added when splitter is moved. The lack of robustness (see below) lead to an exception. Note: Only w/ GLJPanel (no hw/lw mixing) the splitter can be moved in both direction. Only here it is guaranteed that the GL component will survive the action. - Fix AWT-GLCanvas EDT Runnable: swapBuffer().. / display(..) - Check drawable.isRealized() within the lock on the performing thread. This is not possible before issuing the EDT Runnable action since we cannot hold the lock beforehand. - Robustness GLDrawableImpl - boolean realized -> volatile boolean realized - remove 'synchronized' on isRealized() and setRealized(..) - Use dbl-checked locking on 'realized' test for swapBuffers() and setRealized(..) - Robustness GLContextImpl - Catch createImpl(..) exception and properly return CONTEXT_NOT_CURRENT
* GLContextImpl: Make createContextARBImpl/setGLFunctionAvailability more ↵Sven Gothel2012-12-213-6/+6
| | | | robost while detecting erroneous queried GL version
* Bug 651: Mesa3D: GL_INVALID_ENUM in ↵Sven Gothel2012-12-201-17/+25
| | | | | | | | | | glGetIntegerv(pname=GL_MAX_TEXTURE_IMAGE_UNITS) ; Add unit test / bisect Mesa3D This bug lies within Mesa3D (any renderer) and is fixed in commit 8dc79ae7d73cf6711c2182ff9a5d37ef6c989d23. Mesa3D Version 9.0 still exposes this bug, where 9.0.1 has it fixed w/ above commit.
* Cleanup atomic JARs; Removed Debug/Trace pipelines of common profilesSven Gothel2012-12-162-50/+26
| | | | | | | | | | | | | | | | | | | | | GLU: jogl-glu.jar <- jogl-glutess.jar, jogl-glumipmap.jar and javax/media/opengl/glu/* javax/media/opengl/glu/gl2es1/* jogamp/opengl/glu/* jogamp/opengl/glu/error/* jogl-glu-gldesktop.jar stays. CORE (jogl.core.jar): + com/jogamp/opengl/util/* + jogamp/opengl/util/* + com/jogamp/opengl/util/glsl/* + jogamp/opengl/util/glsl/* DEBUG/TRACE: Removed Debug/Trace pipelines of common profiles (won't work anyways) - [Debug|Trace]GL2ES1 - [Debug|Trace]GL2ES2 - [Debug|Trace]GL2GL3
* test scriptSven Gothel2012-12-161-4/+4
|
* Fix/Complete commit b8a8fc24a3afb0cb06a31504bdea1a98b8f00ef4 - Adding ↵Sven Gothel2012-12-162-3/+12
| | | | missing GLU code
* Cleanup GLContext special entries: getOffscreenContextPixelDataType(), ↵Sven Gothel2012-12-153-13/+29
| | | | | | | | | | | | | | | | | | | | | | | getOffscreenContextReadBuffer(), .. ; Add GLFBODrawable API entries for multi buffering (no impl. yet); GLJPanel 1st simplification using offscreen drawable - Cleanup GLContext special entries: getOffscreenContextPixelDataType(), getOffscreenContextReadBuffer(), .. ; - add: getDefaultReadBuffer() (-> exposed via GLBase as well) - add: isGLOrientationFlippedVertical() - add: getDefaultPixelDataType() - removed impl: getOffscreenContextPixelDataType() - removed impl: getOffscreenContextReadBuffer() - removed impl: offscreenImageNeedsVerticalFlip() - Add GLFBODrawable API entries for multi buffering (no impl. yet); - TODO: Add implementation code in GLFBODrawableImpl - GLJPanel 1st simplification using FBO - Use above new GL/GLContext entries - Fix: getNativeSurface() and getHandle() - TODO: - Remove distinction of 'pbuffer' and 'software', - Use GLDrawableFactory.createOffscreenDrawable(..) - Use GL for FBO swapping
* SWT GLCanvas: Fix sporadic drop of redraw on X11 _and_ allow using custom ↵Sven Gothel2012-12-046-8/+12
| | | | | | | | | | | | | | | | | | GLCapabilities on X11 (feature complete) To allow custom GLCapabilities, we had to use native parenting on X11 w/ a new child window. The desired visualID chosen by the users GLCapabilities is passed to the new child window. The redraw drops must be caused by the original GDK or the new child GDK window. Now we use a plain X11 child window similar to NEWT's X11 window and NewtCanvasSWT, which doesn't expose this bug. (Note: SWTAccessor/GLCanvas still contains the uncommented GDK code path for further inspection, if desired) Also added SWTNewtEventFactory to test event handling on the SWT GLCanvas w/ GearsES2. TestSWTJOGLGLCanvas01GLn tests custom GLCapabilities now. SWTEDTUtil has been moved to private: com.jogamp.newt.swt -> jogamp.newt.swt.
* SWT GLCanvas/NewtCanvasSWT: Check isVisible() @ validation; NewtCanvasSWT ↵Sven Gothel2012-12-021-0/+1
| | | | | | | | | | remove just introduced setVisible(false) and adapt to setEDTUtil() changes. ; Enhance Bug 643 unit test: Also test NEWT EDT and pre-visible GLWindow. - SWT GLCanvas/NewtCanvasSWT: Check isVisible() @ validation - NewtCanvasSWT remove just introduced setVisible(false) and adapt to setEDTUtil() changes - Enhance Bug 643 unit test: Also test NEWT EDT and pre-visible GLWindow.
* Bug628: Adding unit-test 'TestNewtCanvasSWTBug628ResizeDeadlock' exposing ↵Sven Gothel2012-11-292-2/+4
| | | | | | | | | | | NewtCanvasSWT asyncExec(..) bug w/ native parenting The unit test shows, that while using JOGL's SWT GLCanvas Display's asyncExec(..) works properly, but w/ NewtCanvasSWT on Windows does not. NewtCanvasSWT differs w/: - Using native parenting [Newt GLWindow to SWT Canvas] - Processing native events in own NEWT EDT, w/ own Windows dispatch hook [For the child GLWindow only]
* SWT GLCanvas: Fix dispose bug, check for isDisposed() and add ↵Sven Gothel2012-11-292-4/+4
| | | | | | | | | | | | | | DisposeListener; Run GL tasks on current thread w/o restrictions Fix dispose bug, check for isDisposed() and add DisposeListener - Don't issue SWTAccessor.setRealized(..), since it's called implicit via super.dispose() - Check isDisposed() .. - add DisposeListener to act on parent's disposal (Shell, Composition, ..) Run GL tasks on current thread w/o restrictions + * The current thread seems to be valid for all platforms, + * since no SWT lifecycle tasks are being performed w/ this call. + * Only GL task, which are independent from the SWT threading model.
* SWT Solaris x86 files: Use version 4.2, 4.3.0-M3 fails, see README.txtSven Gothel2012-11-282-0/+9
|
* Complete commit 541bcc1eecc50656392e1fec1a27b08ab78eceff (SWT version bump ↵Sven Gothel2012-11-281-0/+1
| | | | 3.7.1 -> 4.3.0-M3): gtk-freebsd-x86_64 is still on 3.7.1
* Fix script lstjars.sh's pack200 listSven Gothel2012-11-271-3/+4
|
* SWTEDTUtil/AWTEDTUtil: Fix deadlock situations ; Cleanup ↵Sven Gothel2012-11-275-3/+18
| | | | | | | | | | 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)
* SWT: Bump to version 4.3.0 M3 201210312000Sven Gothel2012-11-2621-375/+31
|
* Add test-x64 script for running SWT junit test cases (only) - also documents ↵Sven Gothel2012-11-251-0/+7
| | | | how to run partial junit tests
* Fix SWTEDTUtil Bug628: Perform NEWT event dispatching on SWT-EDT, due to ↵Sven Gothel2012-11-231-1/+2
| | | | | | possible triggered locking action, i.e. display(). Do the same for AWTEDTUtil. This fix actually clarifies the annotated FIXME :)
* OSX CALayer Stencil/.. Fix: In case of FBO CALayer usage, use default ↵Sven Gothel2012-11-211-5/+6
| | | | | | | | | | 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.
* PMVMatrix: Add 'Frustum glGetFrustum()' adding same dirty/request ↵Sven Gothel2012-11-111-2/+2
| | | | | | | | | 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()
* Reorganize math code into: com.jogamp.opengl.math and ↵Sven Gothel2012-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix GLAutoDrawable.dispose(): Dispose drawable even w/o context; ↵Sven Gothel2012-11-082-11/+21
| | | | | | | | | | | | | | | | | | | 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
* Fix GLDrawableHelper.recreateGLDrawable(..): Sync GL command stream before ↵Sven Gothel2012-11-064-6/+7
| | | | | | | 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.
* GLAutoDrawable: Refine API change of commit ↵Sven Gothel2012-11-051-2/+2
| | | | | | | | | | 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-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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-042-2/+3
| | | | using Applet as component which provokes offscreen FBO layer.
* Adding Andres Colubri's Test Case (junit'fyed), which provokes a Deadlock on ↵Sven Gothel2012-11-042-3/+5
| | | | | | | | | | | | | | | 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.
* GLAutoDrawable: Fix GLEventListener lifecycle and expose more user control ↵Sven Gothel2012-11-042-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-041-0/+1
| | | | | | | Propagate drawable change to MacOSXCGLContext where either context/NSView or context/NSOpenGLLayer association needs to get updated. Fixes drawable/context switch.
* NEWT Windows KeyEvent: We have to store the keyChar for typed events, since ↵Sven Gothel2012-10-312-4/+4
| | | | | | keyChar from pressed/released may be wrong (Uppercase: SHIFT-1, etc ..) Partially reverts commit: b62e1d027c289877686d6008ea8dd40e4e1541ec
* MacOSXCGLContext: Fix ShaderCode instantiation .. (duh!) ; Tested via ↵Sven Gothel2012-10-311-1/+2
| | | | reparenting TestParentingFocusTraversal01AWT
* Fix Unit Tests regarding commit 55f4405dbf9253e6ca686e44c50b2cfc1af7f3eb: ↵Sven Gothel2012-10-311-2/+2
| | | | Shader program name is valid if non-zero.