summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* Fix Bug 827 - ShaderProgam helper class reports errors incorrectlySven Gothel2013-10-191-2/+2
|
* Fix Bug 862: Fix GL Version Validation / NVidia GTX550 driver 331.13 - 64bit ↵Sven Gothel2013-10-193-90/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux - No compatibility GLProfile (GL2, >= GL3bc) Fix GL Version Validation: We shall not rely on our known good versions when validating a queried GL context version, but allow some 'room' for a higher version post JOGL release while still cutting off 'odd versions'. While GL version detection, we always iterate from the highest known version down to the lowest. Hence 'GLContext.isValidGLVersion(..)' is satisfied by validating the lowest version number but allowing a higher than known one. Now we would return 'invalid' for a version >= 6. It is enough to clip to the maximum known version when iterating, allowing the highest unknown version to be available. GLContext.isValidGLVersion(..): Returns true, if the major.minor is not inferior to the lowest valid version and does not exceed the highest known major number by more than one. The minor version number is ignored by the upper limit validation and the major version number may exceed by one. The upper limit check is relaxed since we don't want to cut-off unforseen new GL version since the release of JOGL. Hence it is important to iterate through GL version from the upper limit and 'decrementGLVersion(..)' until invalid. Add GL Version 4.4 to valid known versions. Remove ES3 desktop detection, which is impossible Regression of commit 3a0d7703da32e9a5ddf08a334f18588a78038d88 (ES3 support)
* jogl: allow short-circuited comparison in comparisonHarvey Harrison2013-10-181-1/+1
| | | | | | | For this case && and & work equivalently, but using && allows the second comparison to be omitted if the first comparison is false. Likely just a typo. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: fix typo in RandomTileRenderer, range chack was for tY, not tX againHarvey Harrison2013-10-171-1/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: allow case statements to fall through to same blockHarvey Harrison2013-10-171-2/+0
| | | | | | | | This block is falling through to the next cases where there two variables are set to the same values. Just remove this block and let all cases fall through to the same block. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: fix two impossible comparisons in glu/tessellatorHarvey Harrison2013-10-171-2/+2
| | | | | | | | | The comparison to Long.MAX_VALUE will never trigger as it is coparing with an int. The intent of this code appears to be to check against Integer.MAX_VALUE which is used as an error code (unable to allocate sufficiently large array) from the priorityQueue. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotationsHarvey Harrison2013-10-17218-3/+750
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-17468-9176/+9176
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* AWTPrintLifecycle.setupPrint(..): Fix regression of commit ↵Sven Gothel2013-10-181-6/+7
| | | | | | | | | | | | a05b87a369441d9ef38f97929f866b3d4ced0e57: NULL printGLAD of GLCanvas and NewtCanvasAWT We have to pre-init printGLAD w/ current GLAD (similiar w/ GLJPanel). Also properly define reqNewGLAD: reqNewGLAD = !caps.getSampleBuffers() && ( reqNewGLADOnscrn || reqNewGLADSamples || reqNewGLADSize ); where '!caps.getSampleBuffers() && ( .. )' is due to Bug 830, swapGLContextAndAllGLEventListener and onscreen MSAA w/ NV/GLX does not work.
* Refine Int -> Enum conversion (commit ↵Sven Gothel2013-10-171-11/+29
| | | | | | | 40863632d1428de015099b5967e5136425e99f25), throw IllegalArgumentException if ordinal is out-of-range. Add API doc. - FFMPEGNatives - MouseEvent.PointerType
* Int -> Enum using EnumClass.values()[ordinal] instead of for-loop - ↵Sven Gothel2013-10-171-8/+8
| | | | FFMPEGNatives's Enums and new MouseEvent.PointerType.valueOf(int)
* Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of ↵Sven Gothel2013-10-162-8/+4
| | | | NativeWindow's util types.
* AWTPrintLifecycle.setupPrint(..): Add optional tileWidth and tileHeight, ↵Sven Gothel2013-10-153-27/+50
| | | | allowing user to set custom tile size for performance evaluation/tweak
* GLMediaPlayer: Fix CameraInputScheme URI doc and Android test streams (Use ↵Sven Gothel2013-10-151-1/+1
| | | | mp4 instead of webm, fix Camera URI)
* Merge pull request #71 from esemplare/masterSven Gothel2013-10-121-14/+63
|\ | | | | | | | | Fix Bug 365: Bug on javax.media.opengl.glu.GLU.gluBuild2DMipmaps I will commit your unit test manually from the bug report (pls add it to your pull request next time) Thank you!
| * Fix Bug 365: Bug on javax.media.opengl.glu.GLU.gluBuild2DMipmapsMichael Esemplare2013-10-071-14/+63
| | | | | | | | Fixed convolution window widths for single column scaling.
* | Bug 860 - AWT Printing (AWTTilePainter): Shall use the enclosing integer ↵Sven Gothel2013-10-121-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rectangle of the scaled double precision clipping rect AWTTilePainter simply rounds the scaled double precision clipping rectangle to receive the integer rectangle. This leads to uncovered drawing areas, since the integer rectangle position could be greater - and the size could be smaller than the double precision source. To get the enclosing rectangle, we need to use iPos = floor(position) iSize = ceil(position+size) - floor(position) .. turns our that the double precision 'Rectangle Rectangle2D.getBounds()' already performs this math.
* | Bug 859: Let TileRenderer detect zero columns and rows in eot() where ↵Sven Gothel2013-10-125-49/+171
| | | | | | | | beginTile() throws an EOT IllegalStateException to avoid division by zero
* | Bug 852: Validate CPU sourced data API is allowed, throw exception if not. ↵v2.1.0Sven Gothel2013-10-103-7/+7
| | | | | | | | GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail()
* | Bug 852: Remove CPU sourced data API entry where not allowed (ES3 and GL ↵Sven Gothel2013-10-106-15/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | core >= 3.0) ; GL2 cfg: Ignore GL2ES3 symbols (super) Remove CPU sourced data API entries via new config 'BufferObjectOnly <name>', listed in 'gl-common-gpubufferonly.cfg' and included in ES3 and all GL core >= 3 interfaces. If BufferObjectOnly is defined for a function, only the 'long offset' variant is being emitted. Due to limitations of GlueGen's 'ExtendedInterfaceSymbolsIgnore A.java', which only identifies the function name and not the signature - all CPU sourced variants are manually added to the compatibility and ES2 GL profiles via '*-common-cpubufferJavaCode.java' files. GLContext: Added 'isCPUSourcedAvail()' to determine whether context allows CPU sourced data, i.e. for GL2ES1 and GLES2 ctx. GLContext/GLProfile/GL: isGLES2() now returns false if having a ES3 context due to 'CPU sourced' incompatibility! +++ GL2 cfg: Added ignore GL2ES3 symbols of it's superclass, removing duplicated symbols.
* | 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.