| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
AWT-GLAD's size, since the latter uses AWT's component size.
.. the AWT component size could have been modified after setupPrinting(..).
The AWT-GLAD getWidth() and getHeight() is implemented by AWT's component
and hence may not reflect the actual GLDrawable size while printing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functionality (reshapeTile(..), ..); Only process GLEventListener impl. TileRendererListener; attachToAutoDrawable -> attachAutoDrawable, etc.
-TileRendererNotify -> TileRendererListener
- Added methods:
- void reshapeTile(TileRendererBase tr,int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight);
- void startTileRendering(TileRendererBase tr);
- void endTileRendering(TileRendererBase tr);
allowing to clarify user code and API specification,
i.e. TR only processes GLEventListener which impl. TileRendererListener.
This also allows simplifying the API doc, while having a more descriptive
reshape method focusing solely on tile rendering.
Further more, the start/end TR methods allow certain GL related actions
while the context is current before and after iterating through the tiles.
This is even used for RandomTileRenderer (one tile only), to allow
to reuse same TileRendererListener for diff TRs.
- Fix language, attach and detach usage was vice versa. We do attach an GLAutoDrawable to a TR
- attachToAutoDrawable -> attachAutoDrawable
- detachFromAutoDrawable -> detachAutoDrawable
- Adapted unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In FBO mode save TextureState of current texture-unit,
as well as for the fbo texture-unit if the latter is a different.
In glslTextureRaster mode for verical flip (using FBO),
set the viewport to drawable size if before flipping and restore afterward - if equired.
TestGLJPanelTextureStateAWT fully tests use cases:
- Keep texture bound w/ same or other texture-unit
- Use 2 viewports within one drawable and keep it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
double precicion clip bounds 'all the way'; Explicitly scale image and clip w/ current scaled transform.
- Use 'Shape getClip()'
Don't assume Rectangle2D, but use Shape's getBounds2D()
- Use double precicion clip bounds 'all the way'
Remove rounding error on clip bounds w/ start value, which was _not_ using doubles.
- Explicitly scale image and clip w/ current scaled transform.
Instead of abusing Graphics2D's clip shape to scale image size and clip-area,
explicitly use transform both bounding boxes into transformed space,
scale space and transform out (inversion).
A possible NoninvertibleTransformException will be thrown while Graphics2D has not been modified.
|
|
|
|
| |
GLJPanel: Attempt to initialize if not done yet (similar to GLCanvas)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AWTPrintLifecycle's lifecycle
- AWTPrintLifecycle:
- Should decorate:
PrinterJob.print(..),
instead of within Printable.print(..) { .. container.printAll(..); .. }
This is due to AWT print implementation, i.e.
AWT will issue Printable.print(..) multiple times for 'overlapping'
or non-opaque elements!
- Move from javax.media.opengl.awt -> com.jogamp.nativewindow.awt
- Make _interface_ AWT agnostic, i.e. remove Graphics2D from 'setup(..)'
- Add 'int numSamples' to 'setup(..)' to determine the number of samples
- AWTTilePrinter:
- Use double precision when scaling image-size and clip-rect,
then round them to integer values.
Otherwise AWT will use the bounding box for the clipping-rectangular.
- Clip negative portion of clip-rect,
this removes redundant overpaints, as well as increasing the tile count
due to the increased clipping-size.
- Clip the image-size in the tile-renderer according to the clip-rect.
- DEBUG_TILES: Dump tiles to file
- Use sub-image of final BuffereImage instead
of adding another clipping region. This might increase performance
if no clip-rect has been set.
TODO:
TestTiledPrintingGearsSwingAWT overlapping tests exposes
a 'off by one' bug of the first layer's background!
Note: The GL content seems to be correct though - maybe it's simply an AWT rounding error ..
|
|
|
|
| |
drawable, skip vertical flip and use 1:1 y-coord.
|
| |
|
| |
|
|
|
|
| |
GLCanvas/GLJPanel
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and convenient AWT container traversal context; GLCanvas/GLJPanel properly handle existing MSAA and req. AA;
- Test: Don't resize frame, tweek print-matrix
- Use scaleComp72 to scale the frame to fit on page,
i.e. global print matrix
- Use scaleGLMatXY = 72.0 / glDPI
to locally scale on the GL drawable as being passed to AWTPrintLifecycle.setup(..)
- Hence frame stays untouched/stable, no need for 'offscreen' print test,
which is removed.
- AWTPrintLifecycle: Add scale and convenient AWT container traversal context
Use a simple decoration for all AWTPrintLifecycle impl. components within a container:
final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(frame, g2d, scaleGLMatXY, scaleGLMatXY);
try {
} finally {
ctx.releasePrint();
}
- GLCanvas/GLJPanel properly handle existing MSAA and req. AA;
- GLCanvas: Workaround bug where onscreen MSAA cannot switch to offscreen FBO,
i.e. stay 'onscreen'
- GLJPanel: Use new offscreen FBO if MSAA is requested and not yet used.
- GLJPanel.Offscreen.postGL(): always swapBufer(), was missing for !GLSL swapping
Results GLCanvas / GLJPanel:
- Good scaling
- Stable behavior / visibility
- High DPI mode works
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RenderingHints test; setupPrint(Graphics2D): Query RenderingHints to use MSAA rendering
- AWTPrintLifecycle.setupPrint(Graphics2D): Query RenderingHints to use MSAA rendering
- Impl. in GLCanvas
- TODO GLJPanel (would need a new offscreen buffer)
- TiledPrintingAWTBase:
- Fix scaling - Fit frame to page
- add MSAA RenderingHints test
- GLCanvas: Remove dumpStack() DEBUG output
|
|
|
|
| |
reused w/ GLCanvas and GLJPanel
|
|
|
|
| |
print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display!
|
|
|
|
| |
setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT
|
|
|
|
| |
drawing image and show same; Test: Add offscreen print and add borders.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
print(..); Test: Add auto-print w/o UI 72dpi and 300dpi
NOTE: Tile raster is added at print plus lots of debug output - WIP!
- Swap to offscreen at setupPrint()
- Swap GLEventListener (GLEL) and GLContext to fixed size offscreen GLAutoDrawable (GLAD)
- Destroy onscreen drawable/context
- Setup TileRenderer w/ offscreen GLAD
- @ releasePrint() restore onscreen ..
This shall ensure we don't hog the GPU resources when
resizing the AWT component (upscaling).
- Use TileRenderer @ print(..)
The clip-rect will be used as the TileRenderer's image-size
and we perform a whole tile-rendering loop.
This helps to limit resources, see above.
- Test: Add auto-print w/o UI 72dpi and 300dpi
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLEventListener reshape(..) or manual reshape after beginTile(..) method.
GLEventListener reshape(..) method should be aware of TileRenderer usage
and get the missing tile position and image size from it (-> see Gears example).
TestRandomTiledRendering3GL2AWT demos AWT GLCanvas onscreen
being used for random tile rendering to produce a PNG file.
TestTiledRendering1GL2 is now GLAutoDrawable/GLEventListener agnostic,
hence demos plain GLDrawable tile rendering usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
utilization AWTGLPixelBuffer* -> GLPixelBuffer*
GLPixelBufferProvider:
- Default*.getAttributes(): Add componentCount==1 (ALPHA/RED), validate values, throw exception if n/a or not supported
- Add 'allowRowStride' (as for AWTGLPixelBufferProvider)
- Add default for true and false
GLPixelBuffer:
- Add 'allowRowStride' (as for AWTGLPixelBuffer)
- Fix requiresNewBuffer(..):
- aquire minByteSize if passed one is <= 0
- validate minByteSize w/ currentByteSize according to allowRowStride.
AWTGLPixelBuffer: 'allowRowStride' impl. moved to GLPixelBuffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class.
Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to
'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization.
Iff that happens, an AccessControlException may happen, due to requesting an insecure property,
since modules own Debug class has not been added it's trusted prefixes from within it's init block yet.
This seems to be a bug of the JVM .. to me, however .. the above description is the only
able to explain the issue at hand.
+++
Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(),
before calling 'isPropertyDefined(propName, default)'.
+++
Also mark Debug class static methods final!
+++
|
|
|
|
|
|
|
| |
entry to set/get texture unit (default 0).
Allowing a user to set a specific texture-unit and to query the used texture-unit,
allows one to avoid a collision w/ own texture programming .. i.e. removes the burden to setup all params etc.
|
|
|
|
| |
properly; GLJPanel: Rely on GLPixelBuffer.requiresNewBuffer(..) for each frame, don't use local pixelBufferCheckSize (buggy w/ singleton)
|
|
|
|
| |
SingletonGLPixelBufferProvider, if provided - releasing prev. smaller GLPixelBuffer after resize.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLPixelBuffer/.. and enhance usage; GLJPanel: Use GLPixelBuffer* API and SingleAWTGLPixelBufferProvider if possible.
Refactor: TextureData's PixelAttributes/PixelBufferProvider -> GLPixelBuffer/.. and enhance usage
- GLPixelBuffer, GLPixelAttributes and GLPixelBufferProvider have potential for wider audience,
hence extract them to package 'com.jogamp.opengl.util'.
- Using GLPixelBuffer, shall attempt to use pack/unpack row-stride, i.e.
GL2GL3.GL_PACK_ROW_LENGTH, or GL2GL3.GL_UNPACK_ROW_LENGTH.
See GLReadBufferUtil and GLJPanel
- AWTGLPixelBuffer*: Attribute 'row-stride' allows reusing a bigger buffer than requested.
GLJPanel: Use GLPixelBuffer* API and SingleAWTGLPixelBufferProvider if possible.
- Use GLPixelBuffer API to remove redundancies
- Attempts to use SingleAWTGLPixelBufferProvider to save JVM/CPU heap space
for BuffereImage and IntBbuffer (readBack)
Added unit new test demonstrating multiple overlapping GLJPanels reusing (or not)
a singlton SingleAWTGLPixelBufferProvider.
|
|
|
|
|
|
| |
in their own color.
Note: JComponent will introduce flickering if using opaque rendering mode!
|
|
|
|
|
|
| |
PixelBufferProvider: Add 'dispose()' to interface.
Transition reusing AWT specific PixelBufferProvider to allow a later user provided PixelBufferProvider.
|
|
|
|
| |
for null against a temp variable to narrow races
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
DisposeGLEventListenerAction.run() ; Make 'backend' volatile due to possible multi-threading access.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug 719 - Windows BITMAP Offscreen Orientation is not propagated through API
Fix Bug 719 - Windows BITMAP Offscreen Orientation is not propagated through API
Depends on Bug 720, since cleaning up GLContextImpl* is required to move
property 'GLContext.isGLOrientationFlippedVertical()'
to 'GLDrawable.isGLOriented()' where it belongs!
Windows BITMAP GLDrawable impl. isGLOriented() shall return false,
while we keep the BITMAPINFOHEADER's height field negative
to remove the need for vertical flip when used w/ AWT or Windows, ..
Then property 'GLDrawable.isGLOriented()' has to be recognized throughout the
utility functions, i.e. TextureData's mustFlipVertically and hence TextureIO writer.
Fix Bug 720: Unify all platform specific GLContextImpl specializations
GLContextImpl shall have only _one_ unique platform derivative
to allow proper swapping of GLDrawables of any type via:
- 'GLAutoDrawable.setContext(GLContext newCtx, boolean destroyPrevCtx)', which calls
- 'GLContext.setGLDrawable(GLDrawable readWrite, boolean setWriteOnly)'
Exception: External context may be specialized.
All drawable specific property handling shall be provided
and implemented (if possible) via GLDrawable specializations.
- GLContext.isGLOrientationFlippedVertical() -> GLDrawable.isGLOriented()
- PNGImage.createFromData() takes 'isGLOriented' to properly handle vertical flipping simply by line ordering
- TextureIO's PNG writer passes TextureData's getMustFlipVertically() as isGLOriented to PNGImage.createFromData()
- GLReadBufferUtil respects GLDrawable's isGLOriented() when creating TextureData instance.
- Screenshot respects GLDrawable's isGLOriented()
- Screenshot is deprecated, use GLReadBufferUtil.
- Removed all PBuffer attributes, i.e. floatingPoint, RenderToTexture and RenderToTextureRectangle.
- Allows removal of special pbuffer handling in GLContext* implementations.
- Removed also from GLCapabilities*
- Removed from deprecated GLPbuffer
Impact:
- Low, users who desire to render into a texture shall use our FBO GLOffscreenDrawable.
- Only use case was the deprecated GLPbuffer
- floating point framebuffer technology is still patented anyways :)
- Removed Java2DGLContext, which was only used for OSX's GLJPanel Java2D bridge,
which is no more supported anyways.
|
| |
|
| |
|
| |
|
|
|
|
| |
pixel data is ready when invoked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
896e8b021b39e9415040a57a1d540d7d24b02db1): Run on main-thread w/o blocking ; Misc Changes
Commit 896e8b021b39e9415040a57a1d540d7d24b02db1 moved all native CALayer calls to the current thread
to avoid deadlocks.
Even though this seemed to be fine at least resource GC (release/dealloc calls) were issued
very late in time, probably due to multithreading synchronization of JAWT and/or OSX API.
Example: Our 'TestAddRemove01GLCanvasSwingAWT' test didn't freed CALayer resources incl. GL ctx
when destroying the objects (AWT Frame, GLCanvas, ..), leading to resource starvation .. eventually.
Remedy is a compromise of behavior before commit 896e8b021b39e9415040a57a1d540d7d24b02db1
and that commit, i.e. to run CALayer lifecycle methods on main-thread, but do not block!
The careful part within MacOSXCGLContext.associateDrawable(..) performs the following block on main-thread:
- lock the context
- create NSOpenGLLayer (incl. it's own shared GL context and the DisplayLink)
- attach NSOpenGLLayer to root CALayer
- unlock the context
Due to the GL ctx locking, this async offthread operation is safe within our course of operations.
Details:
- NSOpenGLContext
- Context and CVDisplayLink creation at init
- Call [ctx update] if texture/frame size changed
- 'waitUntilRenderSignal' uses default TO value if given TO is 0 to avoid deadlocks
+++
Misc Changes:
- Fix object type detection: isMemberOfClass -> isKindOfClass
- OSXUtil_isNSView0
OSXUtil_isNSWindow0,
CGL_isNSOpenGLPixelBuffer
- MacOSXCGLDrawable/MacOSXPbufferCGLDrawable: remove getNSViewHandle() method.
MacOSXCGLContext uses common code to detect nature of the drawable handle.
- MacOSXCGLContext/CALayer: Use safe screenVSyncTimeout values, never 0 to avoid deadlock!
- JAWTWindow.invalidate: Call detachSurfaceLayer() if not done yet
|
|
|
|
|
|
|
|
|
|
|
|
| |
need for explicit call
- OffscreenLayerSurface.layoutSurfaceLayer() removed, no more required
- JAWTWindow adds a ComponentListener, which issues FixCALayerLayout() at resized, moved and shown.
- MyNSOpenGLLayer no more requires fix*Size() methods
- MyNSOpenGLLayer::setDedicatedSize() need no explicit CATransaction, performed by caller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Part 4)
Note:
- GLEventListenerState preservs the GLAutoDrawable state,
i.e. GLContext, all GLEventListener and the GLAnimatorControl association.
- GLEventListenerState may be utilized to move the state from a dying GLAutoDrawable,
to be moved to a new created GLAutoDrawable at a later time.
- GLEventListenerState will be made public soon.
+++
Exessive unit tests cover the new feature, tested manually on GNU/Linux/X11 and OSX(Java6/Java7).
+++
- GLAutoDrawable
- Change 'setContext(..)' to allow the destruction of the unbound old context:
'setContext(GLContext newCtx)' -> 'setContext(GLContext newCtx, boolean destroyPrevCtx)'
- Implementations: Properly implement 'setRealized(..)' incl. obeying threading constraints if exists.
Method is being utilized at least for GLEventListenerState.moveTo(..)
to unrealize and realize the drawable resources.
+++
Fix propagation of GLContext/GLDrawable association change (Bottom -> Top):
GLDrawableImpl.associateContext
GLContextImpl.associateDrawable
GLContextImpl.makeCurrent
GLContextImpl.destroy
GLContext.setGLDrawable
...
GLDrawableHelper.switchContext
GLAutoDrawble.setContext
associateDrawable(..)/associateContext(..) unifies and hence:
- GLContextImpl.contextRealized() (removed)
- GLDrawableImpl.contextRealized() (removed)
- GLDrawableImpl.associateContext(..) (merged)
- MacOSXCGLContext.drawableChangedNotify(..) (removed)
+++
- EGLUpstreamSurfaceHook.evalUpstreamSurface() validates the surface's device for reusage,
which is valid in case of GLEventListenerState.moveTo(..)
- MacOSXCGLContext.NSOpenGLImpl: pixelFormat replaces NSOpenGLLayerPfmt and has simplified lifecycle [create..destroy],
while native NSOpenGLLayer code only holds the reference until released.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DEBUG reshape trace.
- Add DEBUG_VIEWPORT flag
Via explicit property 'jogl.debug.GLJPanel.Viewport' (not via jogl.debug=all)
Traces the current GL Viewport in OffscreenBackend.postGL(..)
- Add USE_GLSL_TEXTURE_RASTERIZER flag
Via explicit property 'jogl.gljpanel.noglsl'.
Disables use of GLSL FBO flipping.
DEBUG reshape trace
|
|
|
|
| |
99a50b38f5650fedca0f207e03706ffa9492e50c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mechanism
Due to a NEWT WindowClosing event regression cause by NewtCanvasAWT changes
a review of our WindowClosing event mechanism was required.
Important cleanups are marked w/ '(*)' below.
I would have preferred to change the 'WindowListener.windowDestroyNotify(WindowEvent)'
method to pass a WindowCloseEvent object exposing more information like
toolkit or programmatic destruction and passing whether a 'closing' or 'nop' action
will be performed based on the WindowClosingMode.
For now I postponed this idea .. since it would change the API again,
but may reconsider it after merging the Android 'closing' patch.
- InputEvent.consumedTag -> NEWTEvent.consumedTag
- Window
- (*) Promote setWindowDestroyNotifyAction(Runnable) to public,
former WindowImpl.setHandleDestroyNotify(boolean).
Using a Runnable action for WindowImpl.windowDestroyNotify(boolean)
allows a setting defined alternative for destroy() and gets rid
of [ab]using WindowListener.windowDestroyNotify(WindowEvent) for
lifecycle actions. Used in:
- GLWindow
- GLAutoDrawableDelegate impl.
- WindowImpl
- Respect NEWTEvent.consumedTag for WindowEvents as well
- (*) Impl. setHandleDestroyNotify(boolean) (see above)
- (*) destroy() simply sends out pre- and post- destruction Window events,
where windowDestroyNotify(boolean) sends out the pre-destruction event if NOP.
- (*) windowDestroyNotify(boolean) is public now, allowing other impl. details
to follow proper destruction using handleDestroyNotify Runnable (-> NewtCanvasAWT).
- AWTWindowClosingProtocol:
- addClosingListenerOneShot() -> addClosingListener()
- calling addClosingListener() at addNotify()
- calling removeClosingListener() at removeNotify()
- AWTWindowClosingProtocol ctor taking NOP runnable,
allowing to send WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY at WindowClosingMode.DO_NOTHING_ON_CLOSE
- add/remove listener on AWT-EDT
- AWTWindowAdapter
- Add 'removeWindowClosingFrom(..)',
allowing to remove window closing event fwd.
- Also fwd windowClosed in window closing fwd'ing.
- NewtCanvasAWT
- (*) Utilize AWTWindowClosingProtocol NOP runnable (see above)
to fwd closing-NOP event to NEWT
- (*) Unify remove/destroy code in destroyImpl(..)
- !removeNotify -> destroy NEWT child programatic or as toolkit event
- removeNotify || windowClosing -> destroy jawtWindow
- (*) Remove AWTWindowAdapter/AWTParentWindowAdapter's windowClosingListener,
since we utilize AWTWindowClosingProtocol
- DisplayImpl
- Adding 'final void dispatchMessage(final NEWTEvent event)'
allowing to remove the NEWTEventTask wrapping for no reason
in enqueueEvent(..) if on EDT and waiting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
where our CALayer is moved out of the visible area
- same erroneous behavior for GLCanvas and NewtCanvasAWT
- sized-frame: Set framesize and validate() it
- sized-component: Set component preferred size and call frame.pack()
- added workaround 'OffscreenLayerSurface.layoutSurfaceLayer()' to fix CALayer size, which snaps for:
- OK initial size before setVisible: sized-frame and sized-component
- OK resize w/ sized-frame
- OK manual frame resize
- Invisible: w/ sized-component after setVisible()
++
- CALayer-Sublayer (GL) has additional retain/release when added/removed
to be on safe side.
|
|
|
|
|
| |
If !visible, GLCanvas and GLJPanel's paint* and display method shall not render
as the other GLAutoDrawable impl. do (GLWindow, SWT GLCanvas).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't issue removeNotify(), delete drawable and context only!
- Fix Bug 675: NPE w/ Beans.setDesignTime(true)
- Carefully consider Beans.isDesginTime() fixes NPE - added unit test
- Fix GLCanvas.destroy(): Don't issue removeNotify(), delete drawable and context only!
- AWT removeNotify() shall only be issued via AWT itself, not manually
- Add 'destroyImpl(boolean destroyJAWTWindowAndAWTDevice)' to be called by
- GLCanvas.destroy(): destroyImpl( false );
- GLCanvas.removeNotify(): destroyImpl( true );
- Ensures JAWTWindow and AWTDevice are created and destroyed via the AWT callbacks
addNotify() and removeNotify() only.
|
|
|
|
|
|
|
|
| |
threading and resource usage
- Still excluse OSX
- Respect sun.java2d.opengl property
- [Prepare] Allowing OGLPipeline thread usage w/o it's OGL resource usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|