aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph
Commit message (Collapse)AuthorAgeFilesLines
* graph/font: Use 'pixelSize' var-name, remove redundanciesSven Gothel2014-08-281-4/+39
|
* Fix commit b5910f18f0b82a8a1f6f6252dc19971d5e487f39 for toString(): Call ↵Sven Gothel2014-08-282-0/+11
| | | | super.hashCode(), due to InternalError("hashCode not designed")
* Bug 801: Add Graph pass-2 shader for VBAA 'odd' sample countSven Gothel2014-07-091-16/+27
|
* Findbugs: Add comments that FB warnings are of no concern ..Sven Gothel2014-07-081-1/+1
|
* Findbugs: Remove dead-code / unused [temp] storage and it's assignmentSven Gothel2014-07-081-1/+1
|
* Findbugs.normal: Adding safeguard hashCode() implementation throwing ↵Sven Gothel2014-07-083-0/+13
| | | | | | InternalError("hashCode not designed") As long we don't use Object.hashCode() to idenitify the memory address, we can safeguard the code.
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-0310-100/+101
| | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Graph RegionRenderer: Fix GL3 and ES3 GLSL issuesSven Gothel2014-06-111-17/+32
| | | | | | Macro redefine 'texture2D -> texture' was added _after_ the custom texture lookup insertion causing GL3-core to fail.
* Graph: Fix GLSL issue w/ ES3, add 'const float sample_count', since define ↵Sven Gothel2014-06-111-0/+2
| | | | SAMPLE_COUNT is of type 'int'
* Bug 801: Refine commit 9a15aad0e5388a4b927e44d3d2ce136f32474bc2 cache ↵Sven Gothel2014-05-201-3/+1
| | | | | | | | TextureSequence's fragment shader hash-code Adding TextureSequence.getTextureFragmentShaderHashCode() allowing to use a cached hash-code (performance, interface usability). Implemented in GLMediaPlayerImpl and ImageSequence.
* Bug 801: Fix RegionRenderer's TextureSequence shader program selection ↵Sven Gothel2014-05-191-1/+10
| | | | | | | | | | (recognize diff. TextureLookupFragmentShader and TextureSampler2DType) Fix RegionRenderer's TextureSequence shader program selection, i.e. TextureLookupFragmentShader and TextureSampler2DType are considered in the ShaderProgram hash key selector. Now the proper ShaderProgram for different TextureSequence objects will be selected, e.g. diff video pixel formats and/or texture sampler types.
* Minor edits: Fix comments / API-docsSven Gothel2014-05-192-3/+2
|
* Bug 801: Introd. RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED hinting to ↵Sven Gothel2014-04-102-5/+30
| | | | | | | | | | | | deal w/ GL_DEPTH_TEST accordingly Fixes VBORegion2PMSAAES2 no-depth-buffer usage and allows user to control behavior w/o quering GL state. If BITHINT_GLOBAL_DEPTH_TEST_ENABLED set: - RegionRenderer.defaultBlendEnable: glDepthMask(false) - RegionRenderer.defaultBlendDisable: glDepthMask(true) - VBORegion2PMSAAES2 enables/disables GL_DEPTH_TEST, otherwise MSAA is corrupt.
* Bug 801: Region Dirty Update; TextureSequence GLMediaPlayer Fix; Blending Fix ;Sven Gothel2014-04-094-43/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Region Dirty Update - Split dirty -> ShapeDirty + StateDirty, where StateDirty forces re-rendering content w/o geometry update as req. for 2-pass mode. - Fix TextureSequence (GLMediaPlayer) usage in RegionRenderer / GLRegion* - handle GL_TEXTURE_EXTERNAL_OES incl. Android ES3 bug - inject TextureSequence's shader stubs - shader: Use abstract lookup 'texture2D' -> 'gcuTexture2D' - flip scaled colorTexBBox if TextureSequence 'tex.getMustFlipVertically()' - TODO: Handle multiple TextureSequence shader programs! - Fix Blending: GLRegion* / RegionRenderer / RenderState - Disable/Enable depth-writing w/ blending - Region impl. sets proper glBlendFunc*(..), i.e. 2-pass: - render2FBO: glClearColor(0f, 0f, 0f, 0f) glBlendFuncSeparate(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA) - renderFBO: glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA) - User code shall not set glClearColor(..) for 2-pass anymore - Graph-UI Demo - UIShape: - Add MouseGestureListener, combining MouseListener + GestureListener - EventDetails -> PointerEventInfo - PointerEventInfo contains objPos (ray-intersection) and glWin-pos - Toggle: - Separate color (on/off) if enabled - Toggle on click if enabled - SceneUIController - Use PinchToZoomGesture and propagete same gesture to UIShape - Use AABBox.getRayIntersection(..) using 'real' shape coordinates for 1st picking. - Use shape PMV for secondary picking (drag, zoom 2-pointer, etc), see windowToShapeCoords(..) - Sort shapes according to z-value (render: ascending; picking: descending) - Only 'drag' if pointerId matches 1st pressed pointer
* Bug 801: Fix regressions from 9c71f276d1fcc87b69b413847fd1da34b30d0932 ↵Sven Gothel2014-04-041-0/+1
| | | | (UIShape blend clear-color, RegionRenderer initialized) ..
* Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + ↵Sven Gothel2014-04-045-112/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TextureSequence to Region (Demo: TextureButton) Cleanup shader-program location/data update - GLUniformData: - Allow lazy data setup, as used for RenderState.ProgramLocal, see below - RenderState - Separate data (pmv, weight, colorStatic) from program-local uniforms -> add class ProgramLocal. Reduces uniform location lookups, since ProgramLocal is bound to Region impl. - ProgramLocal.update(..) needs to write uniform data always, since data is being used in multiple programs! - No 'dirty' tracking possible, removed - see above. - RegionRenderer - Fix shader-selection: 2-pass programs differ from 1-pass! - No shader-setup at init +++ Add COLORTEXTURE + TextureSequence to Region - Create color-texture coords in vertex-shader via region's bounding box (pass-1) - Use color-texture unit in pass-1 if enabled (own shader program) - Use TextureSequence in Region impl. providing all required data (unit + texture-name) - Demo: TextureButton (a UIShape)
* Bug 801: Reduce temp. object creation, i.e. GC loadSven Gothel2014-04-024-74/+95
|
* Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-025-81/+65
| | | | | | | | | | | | | | in shader; Update attributes and uniforms manually, drop ShaderState; - Due to shader-switching, 'renderModes' are now local to Region, e.g. UIShape etc - Remove RegionRenderer.renderModes - VBORegion2P*: - Use simple 2x float matrix for orthogonal P+Mv - Cleanup shader
* Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-019-258/+675
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in shader; Update attributes and uniforms manually, drop ShaderState; - ShaderCode - add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path) - insertShaderSource(..): pos==-1 -> append code - VectorUtil - add isVec3InTriangle3(..., float epsilon) - add testSeg2SegIntersection(..., float epsilon) - add testTri2SegIntersection(..., float epsilon) - AffineTransform: Return result for chaining - Font - Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)' - Rename getString*() -> getMetric*() - OTGlyph: Release _points field, no more used - - Graph Triangulation - Count additional vertices in: Triangulator, CDTriangulator2D - OutlineShape: - Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()' - Clarify cleanup ot outlines in same method 'cleanupOutlines()' - Count additional vertices .. - Graph Shader: - Start splitting and segmenting shader code for: - pass1 / pass2 - features, i.e. sampleCont, color-channel, ..
* Bug 801: Revise Graph VBAA (Add border dropping MSAA; Test diff. AA modes ↵Sven Gothel2014-03-225-27/+49
| | | | | | | | | | | | | | | | | | | | 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/>
* Quaternion: Add rotateByEuler(..); AABBox: Add translate(..); Minor edits ..Sven Gothel2014-03-171-1/+1
|
* Bug 801: Revisit UIShape/SceneController (Ray-Picking, Full Object/Model ↵Sven Gothel2014-03-161-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | driven, ..) TODO: Transformations SceneUIController handles shapes generic: Rendering, selecting and event traversing. All data (transforms ..) are provided by UIShape. UIShape: - Dispatching NEWT MouseEvent's on MouseEventListener - Separates the 2d-transforms for shape/region and 3d transform, scale and rotation GPUUISceneGLListener0A Demo code merely aggregates the shapes and attaches listener, hence includes the 'application logic'. Working: - picking any shape - dragging, zooming, actions TODO: - Fix transformations, actually the rotations (button) look odd probably due to 'unlucky' rotation center and axis. +++ RegionRenderer: Removed Matrix ops, which shall be applied on PMVMatrix
* Add generic support for picking via raycast intersection and AABBox (or similar)Sven Gothel2014-03-161-2/+0
| | | | | | | | | - 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-153-10/+10
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Quaternion: User EPSILON for all tests against zero and one (identity .. ) ↵Sven Gothel2014-03-152-2/+2
| | | | and document the same. ; Minor edits ..
* Bug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed ↵Sven Gothel2014-03-155-21/+21
| | | | resize.
* Bug 801: Outline/OutlineShape tranform and sort fixes ; Quaternion: Reduce ↵Sven Gothel2014-03-155-29/+86
| | | | | | | | | | | | | | | | | | | | muls in rotateVector Quaternion: - rotateVector(..): Reduce multiplication count by 17 Graph: - Outline - add: transform - fix compareTo .. use EPSILON - OutlineShape - add transform - fix compareTo .. use EPSILON - use Comparator<Outline> in sortOutlines to avoid reversal of list - Extract OutlineShapeXForm, pairing { OutlineShape, AffineTransform }
* Bug 801: Add Frustum support to Region; Misc ..Sven Gothel2014-03-144-40/+122
| | | | | | | | | | | 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 ..
* Bug 801: Fix UI-Graph Demo (Part-1) ; TextRegionUtil: Add Generic ↵Sven Gothel2014-03-061-8/+35
| | | | processString(..) using ShapeVisitor interface (visitor pattern)
* Bug 801: VectorUtil: Pass result vector, allowing caller to manage memory ↵Sven Gothel2014-03-052-16/+25
| | | | (performance, reduce temp objects)
* Bug 801: Refine 'blend' usage and modes (API-doc and demo-code)Sven Gothel2014-03-052-5/+100
| | | | | | | | | | | | | - 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: Add MSAA_RENDERING_BIT ; VBAA: Uses GL_NEAREST (good result) ; ↵Sven Gothel2014-03-022-9/+44
| | | | Demos: Use local GLRegion for uncached text (perf.) ..
* Bug 801: VBAA Render-Mode Based on SampleCount (not a user-based texWidth) ; ↵Sven Gothel2014-03-015-47/+123
| | | | | | | | | | | | | | 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: TextRenderUtil/TextRendererGLELBase - Pass Font and fontSize to all ↵Sven Gothel2014-02-281-22/+22
| | | | methods ; TestTextRendererNEWT00 make font/fontSize configurable, animate fontSize
* Bug 801: Enhance API doc of FontSet and FontFactorySven Gothel2014-02-282-10/+18
|
* Bug 801: TextRegionUtil add 'special' for cache-key; Minor editsSven Gothel2014-02-282-10/+14
| | | | | | 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-283-21/+54
| | | | 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-281-2/+3
| | | | | | | Fix TypecastRenderer: - Ensure quad shapes are closed! - Revalidate point -> shape interpretation using orig. Typcast code - Fix 'midPoint(..)' use float values
* Bug 802: Graph TextRenderer Performance Part-3: Reuse 'float[] coordsEx' ↵Sven Gothel2014-02-271-1/+2
| | | | storage, ease on GC
* Bug 801: Graph TextRenderer Cleanup Part-5: *Region API Cleanup (protected ↵Sven Gothel2014-02-272-20/+17
| | | | impl. part)
* Bug 801: Graph TextRenderer Cleanup Part-4: Text[Render->Region]Util API: ↵Sven Gothel2014-02-272-48/+41
| | | | Better separation of cached and uncached regions
* Bug 801: Graph TextRenderer Cleanup Part-3: Region.addOutlineShape(..) Push ↵Sven Gothel2014-02-275-189/+120
| | | | | | | | | | | | | | | | | | 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-272-52/+2
| | | | | | | | | 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-256-463/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2410-290/+614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2318-1570/+366
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-152-3/+11
| | | | | | | | Add reshapeNotify(..) for NOP PMV reshape notification
| * Bug 890 - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings; ↵Sven Gothel2013-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(..)
| * 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: add missing @Override annotationsHarvey Harrison2013-10-177-0/+31
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>