aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + ↵Sven Gothel2014-04-0437-430/+871
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0218-238/+283
|
* Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0240-603/+528
| | | | | | | | | | | | | | 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-0110-21/+19
|\
| * X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ ↵Sven Gothel2014-04-014-5/+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.
| * Cleanup *GraphicsDevice: Use 'final' for ctor parameter; ↵Sven Gothel2014-04-016-16/+15
| | | | | | | | DefaultGraphicsDevice.getUniqueID(..) shall perform 'intern()' only once.
* | Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0184-1783/+2509
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2616-69/+53
| | | | 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-2524-168/+166
| | | | | | | | | | | - 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-2513-69/+101
| | | | 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-252-12/+31
| | | | custom shader
* Bug 801: Elaborate on multisampling performance/quality: Flipquad, RGSS, ↵Sven Gothel2014-03-2511-81/+346
| | | | | | | | | | | | | 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-2251-1025/+1680
| | | | | | | | | | | | | | | | | | | | 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-192-3/+41
| | | | 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
|
* 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/
* AABBox: Add rotate(..)Sven Gothel2014-03-171-22/+75
|
* Quaternion: Add rotateByEuler(..); AABBox: Add translate(..); Minor edits ..Sven Gothel2014-03-176-39/+113
|
* Bug 801: Revisit UIShape/SceneController (Ray-Picking, Full Object/Model ↵Sven Gothel2014-03-1611-472/+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
* Add generic support for picking via raycast intersection and AABBox (or similar)Sven Gothel2014-03-167-31/+196
| | | | | | | | | - New simple type Ray, denominating a .. ray - Added PMVMatrix.gluUnProjectRay(..) similar to gluUnproject(..) however, result is a Ray. - Added AABBox.intersectsRay(Ray) ..
* NEWT: Minor editsSven Gothel2014-03-162-18/+18
|
* FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit ↵Sven Gothel2014-03-1511-258/+566
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Bug 801: Fix GPUUISceneGLListener0A (GraphUI Demo) .. Transformations .. etcSven Gothel2014-03-156-128/+196
|
* Quaternion: User EPSILON for all tests against zero and one (identity .. ) ↵Sven Gothel2014-03-156-45/+146
| | | | and document the same. ; Minor edits ..
* Bug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed ↵Sven Gothel2014-03-159-93/+137
| | | | resize.
* Bug 801: Outline/OutlineShape tranform and sort fixes ; Quaternion: Reduce ↵Sven Gothel2014-03-1511-61/+125
| | | | | | | | | | | | | | | | | | | | 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 }
* PMVMatrix.glLoadMatrix(Quaternion): Load Quaternion's directly w/o ↵Sven Gothel2014-03-141-2/+15
| | | | intermediate matrix
* Bug 801: Add Frustum support to Region; Misc ..Sven Gothel2014-03-1419-284/+586
| | | | | | | | | | | 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-144-232/+1835
| | | | | | | | | | | - 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-1415-437/+705
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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)
* | 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: AffineTransform: Remove Serializable, make methods final; ↵Sven Gothel2014-03-064-82/+84
| | | | | | | | FloatUtil: Add DEBUG and description about Row-Major and Column-Major Order. AABBOX: Use FloatUtil.DEBUG for mapToWindow(..)
* | Bug 801: Fix UI-Graph Demo (Part-1) ; TextRegionUtil: Add Generic ↵Sven Gothel2014-03-0611-475/+450
| | | | | | | | processString(..) using ShapeVisitor interface (visitor pattern)
* | Bug 801: Fix 183e1bc1868699b99eb9f9c8bf18d646d1120a48 'window box' CalculationSven Gothel2014-03-054-31/+73
| | | | | | | | | | | | | | | | | | | | | | | | 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-058-129/+127
| | | | | | | | (performance, reduce temp objects)
* | Bug 801: Refine 'blend' usage and modes (API-doc and demo-code)Sven Gothel2014-03-0522-116/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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-0222-88/+793
| | | | | | | | Demos: Use local GLRegion for uncached text (perf.) ..
* | TestRulerNEWT01: Use new MonitorDevice.getPixelsPerMM(store)Sven Gothel2014-03-011-39/+34
| |