aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph
Commit message (Collapse)AuthorAgeFilesLines
* Bug 801: Graph OpenGL ES2 and ES3 CompatibilitySven Gothel2014-03-2521-153/+152
| | | | | | | | | | | - Remove 'const' qualifier in shader graph code for non 'absolute' const values - Use extension directive OES_standard_derivatives only for ES2.0, not ES3.0 (graph shader) - Compare float w/ float literals, not int literals! - Android Demo NEWTGraphUI2pActivity: - Is a VBAA example, hence disable scene MSAA!
* Bug 801: Use allsamples 'brute force' for VBAA (best quality) ; Demos: ↵Sven Gothel2014-03-254-10/+10
| | | | Reduce text contrast by 1/10th allowing better AA ; GPUUISceneGLListener0A uses proportional window height font size and one label w/ 10pt
* TypecastRenderer: Validate Shape Generation - Result: OKSven Gothel2014-03-251-0/+4
|
* ShaderCode: Allow 'srcRoot' to be optional ; RegionRendererImpl01: Allos ↵Sven Gothel2014-03-251-5/+18
| | | | custom shader
* Bug 801: Elaborate on multisampling performance/quality: Flipquad, RGSS, ↵Sven Gothel2014-03-2510-80/+345
| | | | | | | | | | | | | Quincunx Using poles only as sampling points is not as effective as: flipquad > rgss >> quincunx Best quality would be 'wholeedge', i.e. average every supersample, however performance is worse here. References: <http://fileadmin.cs.lth.se/graphics/research/papers/inexp_ms2005/> <http://fileadmin.cs.lth.se/graphics/research/papers/masses2003/>
* Bug 801: Revise Graph VBAA (Add border dropping MSAA; Test diff. AA modes ↵Sven Gothel2014-03-2228-522/+1327
| | | | | | | | | | | | | | | | | | | | incl. FXAA2) ; Test exp. LineAA ; Misc Changes - Revise VBAA - Add border to FBO dropping MSAA - This automatically gives AA for edges on FBO boundary - Correcting ceil-diff, use object-diff instead of win-diff (diff := ceil(a)-a, w/ float a) - Reorg shader - using includes to test diff. AA modes: - [poles, wholeedge] * [equalweight, propweight] - fxaa2 - Exp. LineAA (disabled) - Test ROESSLER-2012-OGLES for detected rectangles only - Test boundary line detection See screenshots: <http://jogamp.org/files/screenshots/graphui/20140322/>
* Graph: Fix NPE in case of double destroy call .. (VBORegion2PMSAAES2)Sven Gothel2014-03-171-6/+12
|
* Graph: Fix NPE in case of double destroy call ..Sven Gothel2014-03-172-12/+32
|
* Add generic support for picking via raycast intersection and AABBox (or similar)Sven Gothel2014-03-161-1/+1
| | | | | | | | | - New simple type Ray, denominating a .. ray - Added PMVMatrix.gluUnProjectRay(..) similar to gluUnproject(..) however, result is a Ray. - Added AABBox.intersectsRay(Ray) ..
* FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit ↵Sven Gothel2014-03-151-8/+8
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Quaternion: User EPSILON for all tests against zero and one (identity .. ) ↵Sven Gothel2014-03-151-2/+6
| | | | and document the same. ; Minor edits ..
* Bug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed ↵Sven Gothel2014-03-151-54/+56
| | | | resize.
* Bug 801: Add Frustum support to Region; Misc ..Sven Gothel2014-03-144-7/+47
| | | | | | | | | | | Region: Add Frustum support, to drop 'out of sight' shapes RenderState: Add hints, e.g. BITHINT_BLENDING_ENABLED, allowing user code to toggle background color etc Demos: Incomplete - WIP - Reuse mapped object to window coords computed at reshape - TODO: Use minimal Scenegraph for Graph-UI ..
* Math and PMVMatrix: Cleanup and RefineSven Gothel2014-03-141-15/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added final qualifier where possible - Refined API doc - FloatUtil: - Add machine EPSILON - fixed value and runtime computed (real machEps) - incl. isZero(..), isEqual(..) - Add makeRotationAxis(..) - Moved from PMVMatrix for reusage - Add makeRotationEuler(..) - New, not recommended due to Gimbal-Lock - Add copyMatrix[Column|Row](..) - Add more PI variations and trigo-func float mappings - Removed cross and normalize, use VectorUtil! VectorUtil: - Add copyVec* - Add equals and isZero w/ and w/o EPSILON - Add distance[Square] - Add length[Square] PMVMatrix: - Removed 'destroy' method in favor of making most fields 'final'. AffineTransform: - Added AABBox transform - Public multiply
* Bug 801: AffineTransform: Remove Serializable, make methods final; ↵Sven Gothel2014-03-061-68/+36
| | | | FloatUtil: Add DEBUG and description about Row-Major and Column-Major Order. AABBOX: Use FloatUtil.DEBUG for mapToWindow(..)
* Bug 801: Fix 183e1bc1868699b99eb9f9c8bf18d646d1120a48 'window box' CalculationSven Gothel2014-03-052-30/+24
| | | | | | | | | | | | Commit 183e1bc1868699b99eb9f9c8bf18d646d1120a48 only mapped object's bbox max/min points to window space, which is wrong due to possible rotation in 3d space. This commit adds AABBox.mapToWindow(..) method, which correctly either uses 4 points of the bbox in 3d space (using center-z) or all 8-points and creating a new bounding box. The resulting width and height of this window bbox gives the maximum amount of rectangular pixels for AA.
* Bug 801: VectorUtil: Pass result vector, allowing caller to manage memory ↵Sven Gothel2014-03-053-5/+6
| | | | (performance, reduce temp objects)
* Bug 801: Refine 'blend' usage and modes (API-doc and demo-code)Sven Gothel2014-03-053-4/+2
| | | | | | | | | | | | | - RegionRenderer: Make 'blend' setup pluggable via new GLCallbacks - 'GLCallback's for enable/disable, passed via 'create' method. Add 'defaultBlendEnable' and 'defaultBlendDisable', replacing previos fixed calls. - GLRegion.draw(..) added API-doc notes about: - Decorating call with RegionRenderer.enable(..) - glClearColor impact and blending - VBORegion2P*: Remove fixed glClearColor(..) call
* Bug 801: Fix VBAA Distortions (VBO-size fractional delta) and AA (Sample ↵Sven Gothel2014-03-049-266/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fragment position and count) Inflating the FBO pixel-size of the region using a 'samples count' multiplier to the projected window bounding box allows controlling the AA distortion as well as defining the fragment position due to it's grid-fitting nature, see below. - Fix VBAA Distortions (FBO-size fractional delta) Inflated framebuffer exceeds 'box-size * sampleCount' since it must be the ceiling of the latter due to it's integer number nature. This difference either must reflect the texture-coords -or- the texture bounding vertices-box in the 2nd pass, otherwise a distorion will appear which is quite visible explicit w/ text. Using texture-coords is not suitable, due to floating point accuracy, hence this patch extends the texture bounding vertices-box about the ceiling delta. A comparible distortion existed with the previous implementation as well, since it used an arbitrary FBO-size and hence the magnification was not grid-fitting. Current implementation is grid-fitting, or at least matches the non-inflated grid, since it inflates the original window-size of the region about samples-count. - AA (Sample fragment position and count) Using a sample-count w/ a multiple of 2 (currently 2, 4 and 8 are properly implemented), based on the projected window bounding box will give the 2nd-pass fragment shader (AA) a fragment-postion in center of the sample pixels exposing one AA pixel. Hence we need to use the diagonal coords (NW, SW, ..) off by half a pixel to reach the 1st sample-pixel .. and 1.5 pixels to reach the 2nd .. and so forth.
* Bug 801: Add MSAA_RENDERING_BIT ; VBAA: Uses GL_NEAREST (good result) ; ↵Sven Gothel2014-03-028-14/+509
| | | | Demos: Use local GLRegion for uncached text (perf.) ..
* Bug 801: Cleanup CDTriangulator2DSven Gothel2014-03-011-24/+18
| | | | | | - CDTriangulator2D.getContainerLoop(..) can exit at first 'inside' loop - Make loops field 'final' and clear at reset. - Add more 'final' qualifier
* Bug 801: TypecastRenderer: Don't use Cubic, but 'double quad' / ↵Sven Gothel2014-03-012-12/+14
| | | | GlyfCompositeDescript: Fix NPE
* Bug 801: VBAA Render-Mode Based on SampleCount (not a user-based texWidth) ; ↵Sven Gothel2014-03-014-32/+104
| | | | | | | | | | | | | | Proper FontSize -> PixelSize VBAA Render-Mode Based on SampleCount (not a user-based texWidth) - All Region based APIs now use 'sampleCount' instead of 'texWidth' - VBORegion2PES2 calculates perspective FBO width/height considering the sampleCount Proper FontSize -> PixelSize - Font: Add getPixelSize(fontSize, dpi) - Text* Demos/Classes: Use proper fontSize -> PixelSize
* Bug 801: Drop TypecastRenderer's CUBIC mode if p3 is 'looped'Sven Gothel2014-02-281-2/+2
|
* Bug 801: TypecastRenderer: Rename local point vars for better reviewSven Gothel2014-02-281-50/+51
|
* Bug 801: TypecastRenderer: Disable DEBUG ; Performance Note: ~800-1200 fps ↵Sven Gothel2014-02-281-1/+1
| | | | | | | | | on uncached text line Performance Note: ~800-1200 fps on uncached text line Compared to c3621221b9a563495b4f54fe60e18e8db8cc57fb: ~600 fps and previous impl. ~60fps.
* Bug 801: Fix TypecastRenderer End-Of-Contour and Shape-Closing; add cubic pathSven Gothel2014-02-281-46/+81
| | | | | | | | | | | | | | | | | | | | | | | - Fix TypecastRenderer End-Of-Contour (EOC) - Iterate through contour block up-until EOC-1, not trying to create a new 'path' from EOC. - Add cubic path - Detect a cubic path and use it, i.e. on-off-off-on - Fix Shape-Closing - Close shape at head, not tail, since we add vertices from the head. - Misc - addShape*(..) uses Point parameter 'onCurve' field reflecting proper handling. Status: Ubuntu Font: No artifacts Lucida: Removed all artifacts, but for character 'M' !? - No odd MID point - Maybe inside-outside (inner) detection is buggy ?
* Bug 801: TextRegionUtil add 'special' for cache-key; Minor editsSven Gothel2014-02-284-4/+8
| | | | | | Minor edits: - Add some docs to curve-shader and remove FIXME remark about gcu_Alpha, which will be used < 1.0. - Font: Add more TTF references
* Bug 801: Outline.setClosed(boolean [closed->closeTail]): Always close, but ↵Sven Gothel2014-02-281-12/+8
| | | | allow to either close-tail or head; OutlineShape/Triangulator: Pass 'sharpness' (very little effect though)
* Bug 801: Graph TextRenderer Cleanup Part-6: Fix TypecastRenderer; Minor EditingSven Gothel2014-02-283-63/+89
| | | | | | | Fix TypecastRenderer: - Ensure quad shapes are closed! - Revalidate point -> shape interpretation using orig. Typcast code - Fix 'midPoint(..)' use float values
* Bug 801: Graph TextRenderer Cleanup Part-5: *Region API Cleanup (protected ↵Sven Gothel2014-02-272-16/+10
| | | | impl. part)
* Bug 801: Graph TextRenderer Cleanup Part-4: Text[Render->Region]Util API: ↵Sven Gothel2014-02-271-20/+23
| | | | Better separation of cached and uncached regions
* Bug 801: Graph TextRenderer Cleanup Part-3: Region.addOutlineShape(..) Push ↵Sven Gothel2014-02-273-126/+115
| | | | | | | | | | | | | | | | | | GL data directly incl. all index validations Region: - Remove redundant methods to make OutlineShape the unique source. - addVertex(..) - addTriangles(..) - Perform all index validations in addOutlineShape(..) - Push OutlineShape's vertex data and it's triangle indices directly to VBO. GLRegion: Add clear(..) method, allowing to clear the region for new data, i.e. OutlineShapes
* Bug 801: Graph TextRenderer Cleanup Part-2: Remove Path2D from ↵Sven Gothel2014-02-275-349/+49
| | | | | | | | | Glyph/Typecast* ; Misc Cleanup Commit c3621221b9a563495b4f54fe60e18e8db8cc57fb introduced create an OutlineShape per Glyph from it's data w/o going through Path2D. Misc Cleanup: Remove unused code/fields, use private/final where possible.
* Bug 802: Graph TextRenderer Performance Part-2 (fix artifacts, cleanup, ↵Sven Gothel2014-02-254-149/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incomplete) - OutlineShape - Add DIRTY_VERTICES bit in triangulation, which in turn solves the rendering artifact issue. - transformOutlines(..) -> protected - Note: Always pick triangles first, then vertices. The former renders vertices dirty. - Region - Make triangles / vertices accessible - Add 'validateIndices()' to add indices for triangles, code moved from the GLRegion* impl. Shall be refined later! - GLRegion - Passing 'RegionRenderer' instead of RenderState .. reducing argument numbers and aligning all related 'render' methods while giving association to the RegionRenderer. - Renderer -> RegionRenderer, dropping 'intermediate' RegionRenderer - Dropping draw() in RegionRenderer, should be issued simply by GLRegion in a unique fashion. - Dropping RegionFactory Too simple code as-is, simply invoke in Region.create(..) - Overall: - Add 'final' qualifier - Remove overloaded methods where rither default args can be used or a followup method call completes the 'intention'.
* Bug 802: Graph TextRenderer Performance Part-1 (incomplete, rendering artifacts)Sven Gothel2014-02-2412-544/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strategy Change: - Font.Glyph itself holds it's OutlineShape with it's default scaling. Triangulation is done only once per glyph! - A CharSequence produces a Region by translating and scaling each Glyphs's OutlineShape. This removes the need for re-triangulate - see above. See: TextRendererUtil - The indices of re-added Triangles are offset to the new vertices (FIXME, seems not be be accurate yet). - OutlineShape's vertices and triangles are reused if 'clean'. - Simplified code - Reduced copies API Changes: - OutlineShape, Region, ...: See above - Removed TextRenderer, GlyphShape and GlyphString: Redundant - Added TextRendererUtil to produce the Region from CharSequence Result: - Over 600 fps while changing text for each frame. Previously only ~60fps max. TODO: - Region shall not hold the triangles itself, but the indices instead. This will remove the need to swizzle w/ vertices in the Region Renderer impl and easies reusage of OutlineShapes.
* Merge branch 'master' into stash_glyphcacheSven Gothel2014-02-23138-1309/+1423
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: make/scripts/tests.sh src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java src/jogl/classes/com/jogamp/graph/curve/Region.java src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java src/jogl/classes/com/jogamp/graph/font/Font.java src/jogl/classes/com/jogamp/opengl/math/VectorUtil.java src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java src/jogl/classes/jogamp/graph/curve/text/GlyphString.java src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
| * Graph: RendereState: Create own PMVMatrix if passed value is null; Renderer: ↵Sven Gothel2014-02-151-4/+0
| | | | | | | | Add reshapeNotify(..) for NOP PMV reshape notification
| * Bug 890 - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings; ↵Sven Gothel2013-11-072-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Validate isGLES*() usage and definition ; Add and use ShaderCode.createExtensionDirective(..) - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings - GLProfile: Add GL2ES2 -> ES3 mapping - EGLContext: Reuqest major '3' for ES3 - EGLGLCapabilities/EGLGraphicsConfiguration: Consider EGLExt.EGL_OPENGL_ES3_BIT_KHR - Validate isGLES*() usage and definition - Fix BuildComposablePipeline's isGLES() code - For GLSL related queries use isGLES() instead of isGLES2(), which would exclude ES3 - Add and use ShaderCode.createExtensionDirective(..) - Supporting creating GLSL extension directives while reusing strings from GLExtensions - Minor cleanup of GLContextImpl.setGLFuncAvail(..)
| * Bug 754 - Remove Ubuntu fonts from jogl-all.jar, provide it separately to ↵Sven Gothel2013-10-311-11/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reduce footprint for the masses. Remove the ubuntu fonts from atomic/jogl-util-graph.jar and hence all derivated 'all' JAR files. The Android jar files still contain the fonts as assets! atomic/jogl-util-graph-fonts-p0.jar contains the fonts and is either referenced by: - UbuntuFontLoader: Using class based Jar URI derivation using TempJarCache to [down]load and extract the jar file (similar to native lib-loading). - Explicitly via traditional classpath, see jnlp-files/jogl-applet-runner-newt-GraphTextDemo01b-napplet.html The pack200 jogl-all.jar file is now below 1MB
| * jogl: add missing @Override annotationsHarvey Harrison2013-10-1766-0/+221
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: remove all trailing whitespaceHarvey Harrison2013-10-17115-1027/+1027
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * More shader fixes for core (GLSL 150): texture2D -> texture, texture3D is ↵Sven Gothel2013-07-172-0/+2
| | | | | | | | deprecated in 130 and removed in 150.
| * Adapt to GlueGen commit 1a01dce6c42b398cdd68d405828774a3ab366456Sven Gothel2013-06-111-1/+1
| |
| * Fix regression of commit b2802021acf8aa9b363ebef383c8dc8c8079ffa4 (Bug 711): ↵Sven Gothel2013-05-187-8/+9
| | | | | | | | | | | | | | | | | | | | varying in/out mapping is different in vertex/fragment shader! Vertex shader: varying -> out Fragemnt shader: varying -> in NV GLSL compiler ignored in/out direction, where ATI GLSL compiler failed (could not find gcu_Weight, due to dead code).
| * Fix Bug 711: Align Graphs's Curve Shader programmatically to used GL/GLSL ↵Sven Gothel2013-05-1721-193/+75
| | | | | | | | version, following all other internal GLSL usage utilizing ShaderCode.
| * jogl: remove executable bit from some java files and a pngHarvey Harrison2013-04-092-0/+0
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * Reorganize math code into: com.jogamp.opengl.math and ↵Sven Gothel2012-11-1111-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com.jogamp.opengl.math.geom packages Note: WIP - We may relocate / reorg math package. Public relocations: com.jogamp.opengl.util -> com.jogamp.opengl.math - FixedPoint - FloatUtil com.jogamp.graph.math -> com.jogamp.opengl.math - Quaternion - VectorUtil com.jogamp.graph.geom -> com.jogamp.opengl.math.geom - AABBox VectorUtil: Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances to be used 'graph' agnostic and to document 2d/3d use-cases.
| * Merge MathFloat into FloatUtilSven Gothel2012-11-113-62/+18
| |
| * *FontLoader: Order fields in init-order, make private.Sven Gothel2012-10-312-11/+11
| |