summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* 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-148-47/+169
| | | | | | | | | | | 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-232/+968
| | | | | | | | | | | - 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-148-283/+560
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-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-061-8/+35
| | | | | | | | processString(..) using ShapeVisitor interface (visitor pattern)
* | Bug 801: Fix 183e1bc1868699b99eb9f9c8bf18d646d1120a48 'window box' CalculationSven Gothel2014-03-053-30/+72
| | | | | | | | | | | | | | | | | | | | | | | | 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-055-9/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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-0211-25/+555
| | | | | | | | 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
* | AudioSink: Fix API doc (minor edit)Sven Gothel2014-03-011-3/+3
| |
* | 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-019-79/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: 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-286-14/+22
| | | | | | | | | | | | 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-284-33/+62
| | | | | | | | 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-284-65/+92
| | | | | | | | | | | | | | 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-274-36/+27
| | | | | | | | impl. part)
* | Bug 801: Graph TextRenderer Cleanup Part-4: Text[Render->Region]Util API: ↵Sven Gothel2014-02-273-68/+64
| | | | | | | | Better separation of cached and uncached regions
* | Bug 801: Graph TextRenderer Cleanup Part-3: Region.addOutlineShape(..) Push ↵Sven Gothel2014-02-278-315/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-277-401/+51
| | | | | | | | | | | | | | | | | | 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
|\|
| * Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) ↵Sven Gothel2014-02-261-2/+2
| | | | | | | | | | | | | | | | | | 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-2510-612/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* | Merge branch 'master' into 2.2-trainSven Gothel2014-02-253-7/+7
|\|
| * Merge remote-tracking branch 'xranby/master'Sven Gothel2014-02-251-2/+2
| |\
| | * Bug 927: Try fix deadlock.Xerxes Rånby2014-02-251-2/+2
| | | | | | | | | | | | | | | | | | (14:15:13) sgothel: @Xerxes: In doResume .. do a 'while( !isActive && !shallPause && isRunning ) {' (14:15:52) sgothel: doPause: while( isActive && !shallPause && isRunning ) (14:31:55) sgothel: doPause only: while( isActive && isRunning ) {
| * | Bug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 ↵Sven Gothel2014-02-252-5/+5
| |/ | | | | | | | | | | | | | | | | | | (which disables print if !isShowing()) Commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 uses 'isShowing' state to determine whether to display or not. It also uses 'isShowing' instead of 'isVisible' for printing, which is a regression, since not showing elements offscreen shall be able to be printed.
* | Bug 802: Graph TextRenderer Performance Part-1 (incomplete, rendering artifacts)Sven Gothel2014-02-2422-834/+840
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-23590-22224/+53526
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-222-7/+13
| | | | | | | | that commands shall be off-loaded on another thread!
| * ALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an ↵Sven Gothel2014-02-221-22/+38
| | | | | | | | exception at destroy
| * Bug 927 - Multithreading (MT) issues ALAudioSinkSven Gothel2014-02-221-53/+54
| | | | | | | | | | | | | | Add global synchronization around ALAudioSink constructor code, which 'magically' solves the openal-soft multithreading issues .. This is a workaround.
| * Bug 927 - Multithreading (MT) issues libav/ffmpegSven Gothel2014-02-224-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | FFMPEG Natives: - Move 'mutex_avcodec_openclose' to local static and initialize at initSymbols0 - setStream0: - Add another locked mutex block around: - [ sp_avformat_open_input .. sp_avformat_find_stream_info ] This solves the issue of: [NULL @ 0x89d20c60] insufficient thread locking around avcodec_open/close()
| * Match Bitstream changes of gluegen commit ↵Sven Gothel2014-02-211-35/+35
| | | | | | | | 4447232af0d95a4348d09d4ed03fbef48394ca3a
| * Bug 980: Use Bitsream class for JPEGDecoderSven Gothel2014-02-201-69/+32
| |
| * GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether ↵Sven Gothel2014-02-183-4/+6
| | | | | | | | dedicated read-drawable is being used (double buffering)
| * Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix auto-swap ↵Sven Gothel2014-02-185-23/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mechanism ; Refined API doc getDefaultReadBuffer() ; Add GLDrawableUtil.swapBuffersBeforeRead(..) Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 which introduces the default swap-buffers mechanism is erroneous: The OffscreenBack backend requires the following operation order: Order-1: [1] - GL display [2] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable) [3] - readPixels +++ Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 however introduced: Order-2: [a] - GL display [b] - readPixels [c] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable) since [a] and [b] happened in Updater's display method, and [c] followed the same triggered by GLAutoDrawableHelper. +++ The proof, commit d46d9ad8f998a7128d9f023294d5f489673d6d8a, is faulty, since it always included the 'snapshot' GL event listener which turned-off auto-swap and swapped before read-pixels. TL;DR it enforced proper Order-1. +++ This fix allows the Backend to intercept disable GLDrawableHelper's setAutoSwapBufferMode(..) and perform the auto-swap mode itself in the proper Order-1. The unit test has been refined to optionally disable the snapshot to validate auto-swap mode. +++ Refined GLBase and GLContext's API doc for 'getDefaultReadBuffer()' +++ Add GLDrawableUtil.swapBuffersBeforeRead(..) and reuse it for TileRendererBase (original impl.).
| * Bug 927: Fix minor MT issues w/ libav/ffmpegSven Gothel2014-02-164-70/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue: [NULL @ 0x35bde60] insufficient thread locking around avcodec_open/close() Decorating said libav functions w/ mutex lock/release. Abstract impl. to either use pthread or JNI Monitor, but using the latter to reduce dependencies (ming64 windows). FFMPEGNatives is now an abstract class containing the 'static final Object mutex_avcodec_openclose'
| * Graph: RendereState: Create own PMVMatrix if passed value is null; Renderer: ↵Sven Gothel2014-02-153-7/+11
| | | | | | | | Add reshapeNotify(..) for NOP PMV reshape notification