summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
Commit message (Collapse)AuthorAgeFilesLines
* jogl: pass format and arguments directly to the printGLError functionHarvey Harrison2013-10-221-7/+11
| | | | | | | This saves us a bit more code size as the String.format is now in the common helper rather than in every GL wrapper function. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: save on class size in the Debug pipelinesHarvey Harrison2013-10-221-11/+22
| | | | | | | Using a format String and arg list produces smaller class files for the Debug classes as many of the format strings are identical and shared. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: do not generate an extra String for the Debug pipeline wrappersHarvey Harrison2013-10-221-4/+4
| | | | | | | | Build the caller string directly and don't wrap it in an extra constructor. Update the indentation level for the newly added if-block from the previous commit. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: change code generation for Debug pipelines to avoid building large stringsHarvey Harrison2013-10-221-15/+11
| | | | | | | | | - split the check for a GL error from the output of the error string - only build the caller String when there is an error to report - wrap String building in an if() block rather than using an early return as we don't know the return type in the postDownstreamCallHook Signed-off-by: Harvey Harrison <[email protected]>
* jogl: use .format() to build the method signature when generating pipeline codeHarvey Harrison2013-10-211-8/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: adapt code generator to output @Override annotations in various placesHarvey Harrison2013-10-211-1/+2
| | | | | | | This adds the @Override to methods in the GL implementations (debug, trace, etc) for methods implementing a GL Profile. It also adds @Override for the toString() method. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: enable generics annotations on TextRendererHarvey Harrison2013-10-201-16/+13
| | | | | | These were already here, enable them. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove clone() version that can only ever failHarvey Harrison2013-10-201-17/+0
| | | | | | | | | | commit: d75835796900cac602f7e5789601ffba0a27efe2 (Graph: More std. functionality (equals, clone) / Better in-place transformation (cubic -> quadratic)) Added a clone method, but did not implement Cloneable, meaning Object.clone() will always throw CloneNotSupportedException. This method never returns anythng but null. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: replce more unneeded String() constructionHarvey Harrison2013-10-201-1/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Fix Bug 827 - ShaderProgam helper class reports errors incorrectlySven Gothel2013-10-191-2/+2
|
* 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: add missing @Override annotationsHarvey Harrison2013-10-1758-0/+255
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-17131-3615/+3615
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of ↵Sven Gothel2013-10-162-8/+4
| | | | NativeWindow's util types.
* GLMediaPlayer: Fix CameraInputScheme URI doc and Android test streams (Use ↵Sven Gothel2013-10-151-1/+1
| | | | mp4 instead of webm, fix Camera URI)
* Bug 859: Let TileRenderer detect zero columns and rows in eot() where ↵Sven Gothel2013-10-123-26/+133
| | | | 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-101-3/+3
| | | | GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail()
* Bug 852: Remove CPU sourced data API entry where not allowed (ES3 and GL ↵Sven Gothel2013-10-103-7/+32
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 789: glDrawArraysIndirect and glDrawElementsIndirect are using ↵Sven Gothel2013-10-062-2/+6
| | | | GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check
* Bug 818: Enable new quirk GLSLNonCompliant on OSX < 10.7 w/ NV GPU; ↵Sven Gothel2013-10-031-3/+10
| | | | GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present.
* GLJPanel/AWTGLPixelBuffer: Reused BufferedImage didn't account for ↵Sven Gothel2013-10-021-1/+38
| | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* 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.
* TileRenderer*: TileRendererNotify -> TileRendererListener w/ clarifying ↵Sven Gothel2013-09-273-62/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 826: GLJPanel: Fully restore TextureState and ViewportSven Gothel2013-09-201-0/+167
| | | | | | | | | | | | 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
* 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.
* Fix TileRendererBase Bug: Avoid multiple GLEL init(..) call.Sven Gothel2013-09-111-2/+11
|
* 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.
* 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-072-12/+5
| | | | GLProfile (just a query, no new profile)
* TileRenderer*: Add more detailed 'toString()' - override for TileRendererSven Gothel2013-09-062-4/+24
|
* TileRenderer*: TileRenderer adds setTileOffset(..), getParam(pname) shall ↵Sven Gothel2013-09-063-36/+23
| | | | | | | | | | | | | | | | | | | 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
* GLDrawableUtil.swapGLContextAndAllGLEventListener: Fix comment - Add remark ↵Sven Gothel2013-09-061-0/+4
| | | | about GLAnimatorControl's which association gets swapped as well.
* GLCanvas Printing WIP - Add TestTiledPrintingGearsAWTSven Gothel2013-09-051-1/+2
|
* TileRendererBase: API-doc cleanup; Fix GLCanvas, WIP printing ..Sven Gothel2013-09-051-2/+2
|
* TileRendererBase: Add interface TileRendererNotify, to notify implementing ↵Sven Gothel2013-09-051-8/+40
| | | | | | | | | | | | | 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-052-2/+12
| | | | for UI agnostic (no-awt tests).
* TileRenderer*: Enhance API Doc; Cleanup OO; Remove PMVMatrixCallback, use ↵Sven Gothel2013-09-053-201/+165
| | | | | | | | | | | | | 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-384/+380
| | | | (cleanup / API doc)
* TileRenderer: Unify TileRenderer, add RandomTileRenderer (both utilizing ↵Sven Gothel2013-09-043-213/+630
| | | | GLPixelBuffer, and pre/post GLEventListener)
* PNGImage: Bounds check in getPixelRGBA8(..) and setPixelRGBA8(..)Sven Gothel2013-09-041-0/+8
|
* GLPixelBuffer*: Add componentCount==1 (ALPHA/RED), 'allowRowStride' ↵Sven Gothel2013-09-046-74/+145
| | | | | | | | | | | | | | | | | 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.
* Cleaned up TiledRenderer capable to be used w/ GL2ES3 and TiledRenderer2 to ↵Sven Gothel2013-09-033-601/+576
| | | | | | | | | | | | | | 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
* GLReadBufferUtil.readPixels(..): Use plain int values for inWidth/inHeight, ↵Sven Gothel2013-09-032-12/+9
| | | | instead int[] - no return value desired.
* GLPixelStorageModes: Fix API doc references, Add ↵Sven Gothel2013-09-031-5/+39
| | | | set[Pack|Unpack]RowLength(GL2ES3 gl, ..)