summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* NativeWindow/OSX: Fix RunOnThread/RunLater - Properly determine 'forkOnMain' ↵Sven Gothel2013-10-071-1/+1
| | | | via onMain && ( isOnMain || 0 < delay )
* FFMPEGMediaPlayer: Use IOUtil.decodeFromURI(..) to unescape %20Sven Gothel2013-10-071-1/+2
|
* Bug 789: glDrawArraysIndirect and glDrawElementsIndirect are using ↵Sven Gothel2013-10-063-2/+8
| | | | GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check
* AWTTilePainter: Avoid NPE if Graphic2D's AffineTransform is null, use ↵Sven Gothel2013-10-031-5/+12
| | | | identity tranform in such case.
* Bug 818: Enable new quirk GLSLNonCompliant on OSX < 10.7 w/ NV GPU; ↵Sven Gothel2013-10-033-10/+36
| | | | GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present.
* Bug 548: GLRendererQuirks.GLFlushBeforeRelease is needed on OSX < 10.7.3 w/ ↵Sven Gothel2013-10-031-2/+2
| | | | NV GPU [was comparing against 1.7.3 instead 10.7.3] !
* GLJPanel: Fix 7u40 access to property 'sun.java2d.opengl'. Property was ↵Sven Gothel2013-10-031-6/+1
| | | | trusted before ..
* Add notice about 'GL states' regarding GLSL vertical flip (Bug 842 and Bug 826).Sven Gothel2013-10-021-2/+13
|
* GLJPanel/AWTGLPixelBuffer: Reused BufferedImage didn't account for ↵Sven Gothel2013-10-022-10/+55
| | | | | | | | | | | | | | | | | | | | | row-stride (regression of b33bdf41cf53f37203643a8551bf5d94b42a8fab) SingleAWTGLPixelBufferProvider w/ allowing row-stride reuses the AWTGLPixelBuffer and it's BufferedImage even w/ different width. This leads to distortion if using the BufferedImage unhandled. GLJPanel also set GL_PACK_ROW_LENGTH to pixelBuffer.width, which leads to an 'out-of-bounds' exception if ReadPixels is used w/ panelwidth and panelHeight. ++ Introduce AWTGLPixelBuffer.getAlignedImage(width, height) which returns an aligned BufferedImage while reusing the DataBuffer. GLJPanel fetches a new alignedImage if required. This allows a more efficient single buffer usage as intended, w/o the need of copying data.
* GLJPanel/Printing: Perform backend.reshape immediatly after printing if ↵Sven Gothel2013-09-291-9/+15
| | | | | | | resized; Add unit test for resize while printing. Perform immediatly reshape at releasePrint on AWT-EDT: - sendReshape = handleReshape(); // reshapeSize -> panelSize, backend reshape w/ GL reshape
* GLJPanel: Remove forced DEBUG .. at handleReshape in releasePrint (added w/ ↵Sven Gothel2013-09-281-1/+1
| | | | commit fe284b515d984198fdbe702837809f181625a457)
* Fix TileRenderer regression of commit ↵Sven Gothel2013-09-281-4/+4
| | | | | | c8abb9d2c9a8c92f0c5c42aba13e3e80c69739dc: Test isSetup() _after_ running glEventListenerPre. glEventListenerPre may be utilized to setup the TileRenderer.
* AWT Printing: releasePrint() issue reshape from AWT-EDT; GLJPanel: Issue ↵Sven Gothel2013-09-282-13/+31
| | | | 'handleReshape' if panelSize/awtSize mismatch, otherwise 'sendReshape' and exception if offscreen size doesn't match panelSize.
* TileRendererBase.GLEL.display(): Skip tile-rendering if TR is not yet setup. ↵Sven Gothel2013-09-283-1/+24
| | | | | | | | | | | | Sync issue w/ NEWT/AWT based GLAD NEWT based GLDrawables may trigger GLAD display() via native repaint events. If using in conjunction w/ AWT, i.e. NewtCanvasAWT and setupPrinting(..) has been called and it's attched to the TR .. it could happen that display tries to issue beginTile() before the TR is being setup. This patch mitigates this issue (while not removing it) by querying whether setup is completed.
* Fix AWT Printing: Use delegated GLDrawable's size for tile-size instead of ↵Sven Gothel2013-09-282-7/+8
| | | | | | | | | 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.
* TileRenderer*: TileRendererNotify -> TileRendererListener w/ clarifying ↵Sven Gothel2013-09-276-67/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* TileRendererBase: Remove redundant reshape propagation of atached GLEL, call ↵Sven Gothel2013-09-241-12/+3
| | | | pre/post reshape in it's display method instead.
* Fix Bug 839: Clarify whether resetStates(..) shall clearStates() - Pass ↵Sven Gothel2013-09-217-31/+34
| | | | 'isInit' flag.
* AWT Printing: Fix non vertical-flipped printing, i.e. cut-off top-row's tile ↵Sven Gothel2013-09-201-19/+20
| | | | | | | | | | | | | | | upper area, cleanup. TestTiledPrintingGearsSwingAWT2: Provoked !flipped bug where top-row was positioned too low due to using full size tile-height. Cutting of the unused top-row's upper area corrects this issue. vertical-flip mode does not expose this situation, since flipping shifts the payload to the upper tile area. TestTiledPrintingGearsSwingAWT2: Also tests an alternative transparent overlapping mode without layout.
* Fix Bug 826: GLJPanel: Fully restore TextureState and ViewportSven Gothel2013-09-202-7/+213
| | | | | | | | | | | | 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
* Bug 839: Clarifying GLStateTracker.clearStates(..) remove 'enable' change - ↵Sven Gothel2013-09-202-9/+12
| | | | | | Part 1 TODO: Only disable state tracker at GLContext.destroy()
* AWTTilePainter.setupGraphics2DAndClipBounds(): Use 'Shape getClip()'; Use ↵Sven Gothel2013-09-193-55/+78
| | | | | | | | | | | | | | | | 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.
* AWTTilePainter: Fix case with no GLOrientation, i.e. no vertical-flip. Tile ↵Sven Gothel2013-09-181-11/+2
| | | | | | location and destination must follow same math as w/ vertical-flip. .. clipping and tile-height was not considered.
* AWTTilePainter: Fix DEBUG message (used wrong value at println)Sven Gothel2013-09-181-1/+1
|
* Fix SharedResourceRunner's potential race-conditions. Use top-level ↵Sven Gothel2013-09-183-104/+109
| | | | synchronization simplifying code and better robustness.
* AWT Printing: Move init-test of setupPrint(..) to AWT-EDT Runnable ; ↵Sven Gothel2013-09-172-35/+43
| | | | GLJPanel: Attempt to initialize if not done yet (similar to GLCanvas)
* Print Tests: Split 'Printable' to own class, add OffscreenPrintable using ↵Sven Gothel2013-09-171-1/+1
| | | | NIO BufferedImage, adding OffscreenPrintable tests to all unit tests.
* Fix AWT printing issues w/ overlapping and/or non-opaque contents ; Change ↵Sven Gothel2013-09-154-262/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ..
* TileRenderer: Add and expose clipped image size; Expose size of tiles.Sven Gothel2013-09-151-32/+119
| | | | | | | | Add clipping of the image-size and hence differentiate the image-size and the size the tile-renderer iterates through. The original image-size is required for the opengl reshape and rendering, where the clipping size may restrict the range of rendering.
* AWTTilePainter: Fix null clip-rect (consider scaling); Fix non GL-oriented ↵Sven Gothel2013-09-133-32/+57
| | | | drawable, skip vertical flip and use 1:1 y-coord.
* Relocate FFMPEGNatives.initIDS0() -> FFMPEGStaticNatives.initIDS0(); Cleanup ↵Sven Gothel2013-09-117-13/+5
| | | | up warnings and includes (clang).
* Fix TileRendererBase Bug: Avoid multiple GLEL init(..) call.Sven Gothel2013-09-111-2/+11
|
* AWT Printing: AWTTilePainter needs to handle null clip!Sven Gothel2013-09-103-8/+12
|
* AWTPrintLifecycle: Add DEFAULT_PRINT_TILE_SIZE (512); Remove unused imports.Sven Gothel2013-09-083-12/+5
|
* Add AWTTilePainter.dumpHintsAndScale(..), removing more duplicated code from ↵Sven Gothel2013-09-083-22/+19
| | | | GLCanvas/GLJPanel
* TileRenderer*: API doc fixesSven Gothel2013-09-082-3/+3
|
* TileRenderer*: Fix pre-swap and post-swap in regards to endTile(..), i.e. ↵Sven Gothel2013-09-083-20/+66
| | | | pre-swap only for FBO && MSAA. See TileRendererBase.reqPreSwapBuffers(..) API doc.
* Fix some JavaDoc and API doc (reference) bugs ..Sven Gothel2013-09-089-54/+65
|
* AWTPrintLifecycle: Add detailed API docSven Gothel2013-09-081-1/+62
|
* Test: Don't resize frame, tweek print-matrix; AWTPrintLifecycle: Add scale ↵Sven Gothel2013-09-084-90/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* TiledPrintingAWTBase: Fix scaling - Fit frame to page, add MSAA ↵Sven Gothel2013-09-074-30/+52
| | | | | | | | | | | | | | 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
* TileRenderer*: Fix FBO MSAA use-case, i.e. call swapBuffers() before ↵Sven Gothel2013-09-073-14/+47
| | | | | | | | | | | endTile(); Enhance unit tests for MSAA, also add TileRendererBase.TileRendererNotify to GearsES2 GL[Auto]Drawable.swapBuffers() must be called before endTile(). This is especially important if using multisampling offscreen FBO drawables, where swapBuffers() triggers the <i>downsampling</i> to the readable sampling sink. Otherwise, we will be 'one tile behind' !
* Fix TileRenderer*: Allow general usage w/ any GL profile, only image-buffer ↵Sven Gothel2013-09-073-25/+77
| | | | | | | | | | | | | requires >= GL2ES3; Always set pack-alignment, Set glReadBuffer(..) >= GL2ES3 - Allow general usage w/ any GL profile, only image-buffer requires >= GL2ES3 Due to GL2ES3.GL_PACK_ROW_LENGTH and image-width != tile-width - Always set pack-alignment Forgot for tile-buffer - Set glReadBuffer(..) >= GL2ES3 Required if using FBO offscreen, i.e. MSAA mode.
* Complete commit 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a, exposing GL2ES3 in ↵Sven Gothel2013-09-074-14/+15
| | | | GLProfile (just a query, no new profile)
* AWT/GL Printing WIP: Abstract AWT tile painting code out to AWTTilePainter, ↵Sven Gothel2013-09-073-301/+300
| | | | reused w/ GLCanvas and GLJPanel
* GLCanvas Printing WIP: Add GLJPanel; GLCanvas TILE_SIZE 512; ↵Sven Gothel2013-09-062-75/+339
| | | | print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display!
* Add AWTPrintLifecycle interface describing impl. w/ ↵Sven Gothel2013-09-062-1/+52
| | | | setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT
* GLCanvas Printing WIP: Perform all print* operations on AWT-EDT, clip before ↵Sven Gothel2013-09-061-147/+184
| | | | drawing image and show same; Test: Add offscreen print and add borders.
* TileRenderer*: Add more detailed 'toString()' - override for TileRendererSven Gothel2013-09-062-4/+24
|
* GLCanvas Printing WIP: Swap to offscreen at setupPrint(); Use TileRenderer @ ↵Sven Gothel2013-09-061-107/+129
| | | | | | | | | | | | | | | | | | | | | | | | 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