aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Bug 816: Fix OSX CALayer 'quirks' for AWT 1.7.0_40 - See JAWTUtil ↵Sven Gothel2013-09-241-23/+97
| | | | | | | | | JAWT_OSX_CALAYER_QUIRK_SIZE and JAWT_OSX_CALAYER_QUIRK_POSITION. - Provide quirk bits for OSX CALayer depending on used JVM/AWT and act accordingly. - TestBug816OSXCALayerPosAWT: Add resize by frame
* Bug 816: Add unit test 'TestBug816OSXCALayerPosAWT'Sven Gothel2013-09-241-0/+363
|
* AWT Printing: Fix non vertical-flipped printing, i.e. cut-off top-row's tile ↵Sven Gothel2013-09-203-3/+407
| | | | | | | | | | | | | | | 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-2013-50/+684
| | | | | | | | | | | | 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
* TestTiledPrintingGearsSwingAWT: Enable 'bitmap' test only on Windows, issues ↵Sven Gothel2013-09-191-7/+12
| | | | w/ AMD catalyst driver and pixmap surface ..
* AWT Print Tests: Only include 600dpi tests if requested via main arg '-600dpi'Sven Gothel2013-09-194-4/+8
|
* AWTTilePainter: Fix case with no GLOrientation, i.e. no vertical-flip. Tile ↵Sven Gothel2013-09-181-2/+17
| | | | | | location and destination must follow same math as w/ vertical-flip. .. clipping and tile-height was not considered.
* RedSquareES1: Add TileRendererBase.TileRendererNotifySven Gothel2013-09-181-17/+69
|
* Print Tests: Split 'Printable' to own class, add OffscreenPrintable using ↵Sven Gothel2013-09-177-207/+536
| | | | NIO BufferedImage, adding OffscreenPrintable tests to all unit tests.
* TestTiledPrintingNIOImageSwingAWT: Add layered test ; Use 300dpi instead of ↵Sven Gothel2013-09-161-3/+9
| | | | 600dpi
* Add 'DirectDataBufferInt' supporting NIO based BufferedImagesSven Gothel2013-09-162-2/+298
| | | | | | | | | | - Contains convenient method to create an NIO backed BufferedImage 'BufferedImage createBufferedImage(int width, int height, int numComponents, Point location)' Standalone test TestTiledPrintingNIOImageSwingAWT 'prints', i.e. renders offscreen, the Frame into - a traditional array-backed BufferedImage - an NIO-backed backed BufferedImage
* Fix AWT printing issues w/ overlapping and/or non-opaque contents ; Change ↵Sven Gothel2013-09-154-86/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ..
* Gears, GearsES2, RedSquareES2: Proper debug output for init, reshape and disposeSven Gothel2013-09-113-7/+7
|
* Add 2nd 'demo' canvas to the other tiled printing tests.Sven Gothel2013-09-112-31/+63
|
* RedSquareES2: Fix tiled aspect ratioSven Gothel2013-09-111-1/+1
|
* TestTiledPrintingGearsSwingAWT: Add a second demo GLEventListener showing ↵Sven Gothel2013-09-104-25/+104
| | | | it's working/scaling well; Adding TileRendererBase.TileRendererNotify to RedAquareES2 having a 3rd demo case.
* Gears*: Clarify frustum calculation for tilingSven Gothel2013-09-102-4/+4
|
* NewtCanvasAWT: Implement AWTPrintLifecycle and hence support for AWT printing.Sven Gothel2013-09-081-0/+241
| | | | | | | | | Note: Same bug existing as w/ GLCanvas, i.e. 'GLDrawableUtil.swapGLContextAndAllGLEventListener(gladPre, gladNew)': If 'gladPre' is onscreen and using MSAA (on NV/GLX), the ctx cannot be made current in it's new 'gladNew' location. Same workaround applied, i.e. use onscreen drawable while printing.
* TiledPrintingAWTBase/doc: Add description of how-to add a 'print-to-file' ↵Sven Gothel2013-09-081-13/+33
| | | | printer driver on OSX
* TileRenderer*: Fix pre-swap and post-swap in regards to endTile(..), i.e. ↵Sven Gothel2013-09-081-16/+56
| | | | pre-swap only for FBO && MSAA. See TileRendererBase.reqPreSwapBuffers(..) API doc.
* Test: Don't resize frame, tweek print-matrix; AWTPrintLifecycle: Add scale ↵Sven Gothel2013-09-083-143/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-205/+293
| | | | | | | | | | | | | | 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-076-41/+187
| | | | | | | | | | | 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' !
* Complete commit 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a, exposing GL2ES3 in ↵Sven Gothel2013-09-075-15/+16
| | | | GLProfile (just a query, no new profile)
* TestTiledPrintingGears*AWT: Add 4s delay before closing frame and ending ↵Sven Gothel2013-09-063-9/+5
| | | | | | unit test to wait for print-job (?) .. otherwise results are cut-off .. better solution ? callback ?
* GLCanvas Printing WIP: Add GLJPanel; GLCanvas TILE_SIZE 512; ↵Sven Gothel2013-09-064-13/+249
| | | | print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display!
* Add AWTPrintLifecycle interface describing impl. w/ ↵Sven Gothel2013-09-062-257/+315
| | | | setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT
* TestTiledPrintingGearsAWT: Perform AWT mods on AWT-EDT, always perform ↵Sven Gothel2013-09-061-13/+23
| | | | g.scale(..), pass 'offscreen' w/ manual printing as well
* GLCanvas Printing WIP: Perform all print* operations on AWT-EDT, clip before ↵Sven Gothel2013-09-061-26/+76
| | | | drawing image and show same; Test: Add offscreen print and add borders.
* GLCanvas Printing WIP: Swap to offscreen at setupPrint(); Use TileRenderer @ ↵Sven Gothel2013-09-061-57/+147
| | | | | | | | | | | | | | | | | | | | | | | | 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
* TileRendering / Gears: Clarify PMV math, if tiling use white background (-> ↵Sven Gothel2013-09-061-6/+14
| | | | print)
* TileRenderer*: TileRenderer adds setTileOffset(..), getParam(pname) shall ↵Sven Gothel2013-09-061-1/+2
| | | | | | | | | | | | | | | | | | | always return last result, no overloading of attachToAutoDrawable(..); Fix comments TileRenderer: - adds setTileOffset(..) A tile offset might be required, i.e. via a given rectangular clip bounds - getParam(pname) shall always return last result Even when finished tiling, the last value shall be returned, otherwise a post endTile() is unable to retrieve the value. - No overloading of attachToAutoDrawable(..) No reason to complicate usage by mutating semantics, call setTileSize(..) manually TileRendererBase: - Fix API doc: TR_CURRENT_TILE_X_POS, TR_CURRENT_TILE_Y_POS
* Add TestGLContextDrawableSwitch02AWT: Test AWT GLCanvas <-> ↵Sven Gothel2013-09-051-0/+192
| | | | GLOffscreenAutoDrawable switch, forth & back
* TestTiledPrintingGearsAWT: Fix margin translate for high dpi, i.e. other ↵Sven Gothel2013-09-051-6/+11
| | | | than 72dpi
* GLCanvas Printing WIP - Add TestTiledPrintingGearsAWTSven Gothel2013-09-051-0/+302
|
* TileRendererBase: Add interface TileRendererNotify, to notify implementing ↵Sven Gothel2013-09-055-18/+13
| | | | | | | | | | | | | GLEventListener about attached/detached TileRenderer .. since GLEventListener's reshape(..) method must query certain tile renderer attributes (tile pos and image size), they have to be aware of the TileRendererBase. To simplify such awareness and hence automate this attachement and passing over the tile renderer reference, they should implement this new interface. Gears example implements the new interface, which caches the TR reference and pauses rotation.
* TileRendererBase: Add toString(), Proper tile unit test names, i.e. add NEWT ↵Sven Gothel2013-09-054-14/+10
| | | | for UI agnostic (no-awt tests).
* TileRenderer*: Enhance API Doc; Cleanup OO; Remove PMVMatrixCallback, use ↵Sven Gothel2013-09-055-207/+568
| | | | | | | | | | | | | 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.
* TileRenderer*: Align impl. to common abstract superclass TileRendererBase ↵Sven Gothel2013-09-043-9/+9
| | | | (cleanup / API doc)
* TileRenderer: Unify TileRenderer, add RandomTileRenderer (both utilizing ↵Sven Gothel2013-09-045-307/+489
| | | | GLPixelBuffer, and pre/post GLEventListener)
* Cleaned up TiledRenderer capable to be used w/ GL2ES3 and TiledRenderer2 to ↵Sven Gothel2013-09-032-0/+307
| | | | | | | | | | | | | | be used w/ GLAutoDrawable. - Remove GL2 dependencies - Only requires PixelStorage ROW_LENGTH -> GL2ES3 - Position target buffer position according to skip [pixels, rows] - Use an interface PMVMatrixCallback, allowing user to reshape the custom 'PMV Matrix' according to the current rendered tile - Properly adjust tile/image buffer to written position and flip for read operation
* Gears: Make rotation optionalSven Gothel2013-09-031-2/+7
|
* X11GLXDrawableFactory.Shutdown: Disable shared context destruction since it ↵Sven Gothel2013-09-021-3/+3
| | | | | | | | | may lead to a JVM freeze .. .. on ATI fglrx driver 32bit on 64bit w/ a frozen shared GL context involved. Hence we have to rely on the driver cleanup when JVM hits 'exit', equal to the Windows implementation.
* Animator/GLWindow: Catch 'ThreadDeath/Throwable' and dump info in DEBUG mode ↵Sven Gothel2013-09-021-6/+11
| | | | (cosmetic change only); Typo in comment; TestSharedContextListNEWT2: Stop animator.
* Add '@FixMethodOrder(MethodSorters.NAME_ASCENDING)' to all *Test* classes; ↵Sven Gothel2013-09-02218-6/+658
| | | | | | | | Relying on junit 4.11 + hamcrest 1.2 (deployed in Gluegen junit.jar) See gluegen commits: - 10a28c860bd3f4ccecef156c9bbbc88087bf568d - 70c9ba258c5ba3d78f0f52faf37d88b4c62d0c96
* GLMediaPlayer: pause() -> pause(boolean flush): Allowing to flush buffers, ↵Sven Gothel2013-08-312-3/+3
| | | | next frame after play() will provide new frame. Added API doc.
* GLMediaPlayer enhancements: State, Camera options, detect and act on ↵Sven Gothel2013-08-302-55/+129
| | | | | | | | | | | | | | | | | | | | orientation change (flipped), API-doc, - State - Fix state transition (initGL() error) - Camera options - options uses ';' as query separator - don't use 'default' options, driver should know - Detect and act on orientation change (flipped) - ffmpeg impl detects if flipped changes and triggers a SIZE update event. This allows application to react, i.e. re-init GL and use new TextureCoord's. Test: Works well on Windows w/ rawvideo dshow camera driver/codec. - API-doc - TexSeqEventListener/GLMediaEventListener usage / constraints (GL, ..) - State transition fix
* GLMediaPlayer: Add camera input / FFMPEG: Fix 'av_packet' leak and add ↵Sven Gothel2013-08-273-11/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | missing symbol 'av_realloc'. - Add camera input - Use URI w/ scheme 'camera' to determine camera input is desired, use URI host as camera id. E.g. 'camera://0' for 1st camera. - AndroidGLMediaPlayerAPI14: Via 'Camera' - FFMPEG*: Via libavdevice, device name and input format - TODO: Add controls to manipulate camera if available - FFMPEG* - Add symbols - avcodec_register_all - av_realloc (was missing) - avdevice_register_all - Load libavdevice (opt) - Camera: - Use <ID> (windows) and /dev/video<ID> other OS - simply find the input format in native code - Support YUYV422 (used in video4linux2, etc.) - Stuff 2x 16bpp (YUYV) into one RGBA pixel! - Add texture format for 16bpp - Add texture lookup shader - Fix av_packet leak in readNextImpl(..) - Restore orig pointer and size values, we may have moved along within packet. Then call av_free_packet(). - Use null AudioSink if audio-id is NONE
* AndroidGLMediaPlayerAPI14: Fix implementation to coop w/ threaded decoder / ↵Sven Gothel2013-08-255-18/+6
| | | | | | | | | | | | | Add EOS detection, setAudioVolume(..) GLMediaPlayerImpl.initStreamGL(..): Only require a minimum texture count of 2, which is the bare minimum to allow our algorithm to work, i.e. having a 'lastFrame' and avail/playing ringbuffer have each one frame. Android's MediaPlayer API can only deal w/ one SurfaceTexture, hence we have to fake a second SurfaceTextureFrame w/ same content to allow our implementation to work w/ the threaded decoder (min 2 frames).
* GLMediaPlayer/AudioSink: Add set[Audio]Volume(float v)/get[Audio]Volume() ↵Sven Gothel2013-08-252-0/+18
| | | | allowing to change the audio volume.