aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Reduce jar-size / cleanup: Replace 1 kB test-ntsc01-57x32.png w/ 400kB ↵Sven Gothel2014-04-101-1/+1
| | | | test-ntsc01-28x16.png asset ; Generalize TextureSequenceDemo01 -> SingleTextureSeqFrame ; Unit tests use test-data, not assets.
* Bug 801: Introd. RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED hinting to ↵Sven Gothel2014-04-101-2/+11
| | | | | | | | | | | | 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.
* VectorUtil: Fix method names, i.e. use type-suffix in end of function for ↵Sven Gothel2014-04-092-5/+5
| | | | clarity and unique method naming
* Bug 801: Region Dirty Update; TextureSequence GLMediaPlayer Fix; Blending Fix ;Sven Gothel2014-04-097-49/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* FFMPEGMediaPlayer: Use 'const' qualifier in shader stubSven Gothel2014-04-091-4/+4
|
* Add TextureSequence.isTextureAvailable(), allowing triggering action only ↵Sven Gothel2014-04-091-0/+5
| | | | when source becomes ready
* Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + ↵Sven Gothel2014-04-0410-89/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-127/+110
|
* Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0211-297/+115
| | | | | | | | | | | | | | 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
* Merge branch 'master' into graph-wipSven Gothel2014-04-013-4/+4
|\
| * X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ ↵Sven Gothel2014-04-013-4/+4
| | | | | | | | | | | | | | | | withinGLVersionsMapping:=true if null == sharedContext .. otherwise no quirk could be set on non ARB ctx GL implementations. null == sharedContext, always for first context creation, i.e. indeed within GL version mapping.
* | Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0149-1209/+1290
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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/>
* GLRendererQuirks.NoMultiSamplingBuffers: Prelim detection of this quirk due ↵Sven Gothel2014-03-191-1/+14
| | | | to Gallium/Nouveau Driver (TODO: Handle it in GLCapabilities Selection)
* 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-162-6/+6
| | | | | | | | | - 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-152-12/+12
| | | | 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-144-26/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-102-9/+38
|\
| * Bug 961: Stabilize glXGetFBConfigAttrib(..) and glXChooseFBConfig(..) Usage ↵Sven Gothel2014-03-102-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Against OpenGL Bugs ; Fix glXGetFBConfigs - glXChooseFBConfig(..) - Remove NULL FBConfig pointer from result in native code, which has been observed in Mesa 8.0.5-4 libgl1-mesa-swx11 (Debian-7). - glXGetFBConfigs - Add manual implementation similar to glXChooseFBConfig - glXGetFBConfigAttrib(..) - glXGetFBConfig(..) - Returns boolean reflecting success, don't throw exception - caller handles error - Caller ignore failure if not essential (i.e. already chosen config)
* | 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.
* | Merge branch 'master' into 2.2-trainSven Gothel2014-02-261-2/+2
|\|