aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Add TextureSequence.isTextureAvailable(), allowing triggering action only ↵Sven Gothel2014-04-091-0/+3
| | | | when source becomes ready
* Bug 801: Fix regressions from 9c71f276d1fcc87b69b413847fd1da34b30d0932 ↵Sven Gothel2014-04-043-17/+18
| | | | (UIShape blend clear-color, RegionRenderer initialized) ..
* Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + ↵Sven Gothel2014-04-0420-205/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-026-22/+34
|
* Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0220-143/+167
| | | | | | | | | | | | | | 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-0123-287/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, ..
* Demos MovieCube/Simple: Update video URLs .. since download.blender.org ↵Sven Gothel2014-03-2615-69/+52
| | | | seems to be down / Use h264 stream for 'desktop' as well
* MovieCube/Simple on Android/GLES: Cache FPS Region (updated only each ↵Sven Gothel2014-03-263-18/+39
| | | | second) to mitigate low-performance (update is CPU bound)
* Fix test applets: GraphTextDemo (No MSAA, add VBAA def. ctor ↵Sven Gothel2014-03-261-0/+7
| | | | GPUTextGLListener0A); MovieCube (Size 800x600)
* Bug 801: Adjust Tests: GPUUIScene* use window proportional button size; Add ↵Sven Gothel2014-03-2511-81/+367
| | | | Android MovieCubeActivity0a for 'no text' version
* Bug 801: Graph OpenGL ES2 and ES3 CompatibilitySven Gothel2014-03-251-12/+10
| | | | | | | | | | | - 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-259-59/+91
| | | | Reduce text contrast by 1/10th allowing better AA ; GPUUISceneGLListener0A uses proportional window height font size and one label w/ 10pt
* Bug 801: Elaborate on multisampling performance/quality: Flipquad, RGSS, ↵Sven Gothel2014-03-251-1/+1
| | | | | | | | | | | | | 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-2216-462/+218
| | | | | | | | | | | | | | | | | | | | 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/>
* SceneUIController: Remove unused (and not commited) Matrix referenceSven Gothel2014-03-171-3/+0
|
* Fix GraphUI - Remove MSAA if in VBAA mode (double AA not so good) - Adding ↵Sven Gothel2014-03-173-4/+13
| | | | NApplet for VBAA
* Bug 801: GraphUI .. Missed 'CrossHair' Class (Commit ↵Sven Gothel2014-03-171-0/+109
| | | | 6382ee094953fd4fef35a8e60a29b482ae1b79c3)
* Bug 801: GraphUI .. Fixed transformations, cleanup - All shape-object ↵Sven Gothel2014-03-178-274/+685
| | | | | | oriented actions. http://jogamp.org/files/screenshots/graphui/01/
* Bug 801: Revisit UIShape/SceneController (Ray-Picking, Full Object/Model ↵Sven Gothel2014-03-1610-451/+514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit ↵Sven Gothel2014-03-152-54/+286
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Bug 801: Fix GPUUISceneGLListener0A (GraphUI Demo) .. Transformations .. etcSven Gothel2014-03-156-128/+196
|
* Bug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed ↵Sven Gothel2014-03-152-3/+3
| | | | resize.
* Bug 801: Outline/OutlineShape tranform and sort fixes ; Quaternion: Reduce ↵Sven Gothel2014-03-155-20/+14
| | | | | | | | | | | | | | | | | | | | 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-1411-237/+417
| | | | | | | | | | | 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 ..
* Quaternion: Fix and enhance class incl. Extensive Unit Tests (all passed)Sven Gothel2014-03-142-0/+867
| | | | | | | | | | | - Add documentation incl references (Matrix-FAQ, Euclideanspace, ..) - Compared w/ other impl., i.e. WildMagic, Ardor3D, .. and added missing functionality incl unit tests. - PMVMatrix: Added convenient Quaternion 'hooks' - glRotate(Quaternion) - glLoadMatrix(Quaternion)
* Math and PMVMatrix: Cleanup and RefineSven Gothel2014-03-147-154/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Merge branch 'master' into 2.2-trainSven Gothel2014-03-073-0/+254
|\
| * Bug 975: Add TestGLReadBuffer01GLCanvasAWT Unit Test (AWT Frame w/ GLCanvas)Sven Gothel2014-03-073-0/+254
| |
* | Bug 801: Fix UI-Graph Demo (Part-1) ; TextRegionUtil: Add Generic ↵Sven Gothel2014-03-0610-467/+415
| | | | | | | | processString(..) using ShapeVisitor interface (visitor pattern)
* | Bug 801: Fix 183e1bc1868699b99eb9f9c8bf18d646d1120a48 'window box' CalculationSven Gothel2014-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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: Refine 'blend' usage and modes (API-doc and demo-code)Sven Gothel2014-03-0517-107/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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-0211-63/+238
| | | | | | | | Demos: Use local GLRegion for uncached text (perf.) ..
* | TestRulerNEWT01: Use new MonitorDevice.getPixelsPerMM(store)Sven Gothel2014-03-011-39/+34
| |
* | Bug 801: VBAA Render-Mode Based on SampleCount (not a user-based texWidth) ; ↵Sven Gothel2014-03-0120-293/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-288-82/+124
| | | | | | | | methods ; TestTextRendererNEWT00 make font/fontSize configurable, animate fontSize
* | Bug 801: TypecastRenderer: Disable DEBUG ; Performance Note: ~800-1200 fps ↵Sven Gothel2014-02-281-9/+17
| | | | | | | | | | | | | | | | | | on uncached text line Performance Note: ~800-1200 fps on uncached text line Compared to c3621221b9a563495b4f54fe60e18e8db8cc57fb: ~600 fps and previous impl. ~60fps.
* | Bug 801: TextRegionUtil add 'special' for cache-key; Minor editsSven Gothel2014-02-281-1/+0
| | | | | | | | | | | | 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-10/+10
| | | | | | | | allow to either close-tail or head; OutlineShape/Triangulator: Pass 'sharpness' (very little effect though)
* | Bug 801: Graph TextRenderer Cleanup Part-4: Text[Render->Region]Util API: ↵Sven Gothel2014-02-278-53/+72
| | | | | | | | Better separation of cached and uncached regions
* | Bug 801: Graph TextRenderer Cleanup Part-3: Region.addOutlineShape(..) Push ↵Sven Gothel2014-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch 'master' into 2.2-trainSven Gothel2014-02-261-23/+59
|\|
| * Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) ↵Sven Gothel2014-02-261-23/+59
| | | | | | | | | | | | | | | | | | parameters for mapBufferRange(..) and mapNamedBufferRange(..) GLBufferObjectTracker.mapBuffer(..) variant for mapBufferRange(..) and mapNamedBufferRange(..) used wrong parameters in it's mapBufferImpl(..) call. Fixed and added mapBufferRange(..) test in TestMapBufferRead01NEWT
* | Bug 802: Graph TextRenderer Performance Part-2 (fix artifacts, cleanup, ↵Sven Gothel2014-02-2516-82/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2423-535/+576
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Bug 801: Graph TextRenderer Cleanup Part-1b (clean)Sven Gothel2014-02-232-47/+109
| | | | | | | | | | Concludes commit f51933f0ebe9ae030c26c066e59a728ce08b8559 w/ final fixes on merge commit 3352601e0860584509adf2b76f993d03893ded4b.
* | Merge branch 'master' into stash_glyphcacheSven Gothel2014-02-23466-5692/+62185
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Bug 927 - Multithreading (MT) - GLMediaPlayer.GLMediaEventListener: Remind ↵Sven Gothel2014-02-223-59/+78
| | | | | | | | that commands shall be off-loaded on another thread!
| * Merge remote-tracking branch 'xranby/master'Sven Gothel2014-02-211-0/+208
| |\
| | * Bug 927: demos/es2/av/CrossFadePlayerXerxes Rånby2014-02-211-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parallel media player that demonstrate CrossFade of audio volume during playback. This player also demonstrate audio only playback of the GLMediaPlayer. The CrossFadePlayer is a reproducer for FFMPEGMediaPlayer libav multithreading initialization errors. [NULL @ 0x7ff904065280] insufficient thread locking around avcodec_open/close() reproducer: java -cp gluegen/build/gluegen-rt.jar:jogl/build/jar/jogl-all-mobile.jar:jogl/build/jar/jogl-test.jar:joal/build/jar/joal.jar com.jogamp.opengl.test.junit.jogl.demos.es2.av.CrossFadePlayer *.mp3 Signed-off-by: Xerxes Rånby <[email protected]>
| * | Cleanup imports TestGLReadBuffer01GL*Sven Gothel2014-02-202-2/+0
| |/