summaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Demos: ..demos.graph.ui.util.GraphUIDemoArgs -> ..demos.util.CommandlineOptionsSven Gothel2023-08-1316-34/+33
|
* GraphUIDemoArgs: Issue GLProfile.initSingleton() once in static init block, ↵Sven Gothel2023-08-131-0/+4
| | | | | | ensuring JOGL is completely initialized Noteable: On MacOS 13.1 (aarch64) UISceneDemo20 won't show the window if NEWT is initialized before JOGL core via GLProfile.initSingleton().
* UISceneDemo20: Fix info/debug text title GPUUISceneGLListener0A -> UISceneDemo20Sven Gothel2023-08-131-7/+8
|
* GraphUIDemoArgs: Add GL4 coreSven Gothel2023-08-131-0/+2
|
* Demos: Add main() to GearsES2, .. allowing to be used for simple bringup testsSven Gothel2023-08-133-12/+166
|
* Animator*: Add ctor variants passing modeBits directly, i.e. enable/disable ↵Sven Gothel2023-08-1326-29/+32
| | | | AWT rendering thread support. Adopt it in tests and demos
* Untangle joal from build requirements as introduced via new jogl-demosSven Gothel2023-08-073-6/+4
| | | | | | | | | | | | | | | | | | To enjoy the UISceneDemo20 demo, joal shall exist at its usual location. However, pass build if not available. Also drop ant + junit from demos. - Rename jogl-demo-android.{jar,apk} -> jogl-demos-android.{jar,apk} - New demo classpath - Add non-joal demo classpath - Add joal demo classpath. - Drop junit + ant from both - Remove joal from junit compile path. - Build test: demo compilation (Java + Android) - Drop joal dependencies if not available
* Graph / GraphUI Demos: Don't use the color-channel if not required (mixing ↵Sven Gothel2023-08-026-14/+17
| | | | | | | colors within one region) Note, commit bb6ee81bc5514663bb7b22224fcdd5ba34a51ac6 relaxes the requirement for using a color-channel.
* Graph: Simplify RegionRenderer API by exposing common RenderState methods ↵Sven Gothel2023-08-028-41/+39
| | | | (and fwd 'em to RenderState aggregate)
* UISceneDemoU01a: Destory textRegion @ disposeSven Gothel2023-08-011-0/+1
|
* Graph Add {GLRegion, GraphShape}.setTextureUnit(int): Allowing to set ↵Sven Gothel2023-08-011-8/+18
| | | | texture unit after ctor
* Graph RegionRendered.init(..): Disable renderer (and shader programs etc) to ↵Sven Gothel2023-08-011-4/+3
| | | | avoid side-effects. Usually called @ GLEventListener.init(..)
* Add Graph/GraphUI UISceneDemoU01a, showcase integration and multiple ↵Sven Gothel2023-08-011-0/+351
| | | | projection settings
* Graph: Minor cleanup: TextRegionUtil: Fix API doc references; ↵Sven Gothel2023-08-011-1/+0
| | | | RegionRenderer.enable(..) merge '!enable' branch, fix API doc
* GraphUI UISceneDemo20: Add OpenAL spatial 3D sound features: Add ↵Sven Gothel2023-05-231-5/+219
| | | | | | | | | | | SimpleSineSynth Button and have MediaButton to produce mono-only for 3D sound - Move SimpleSineSynth and MediaPlayer around for spatial 3D sound - Shape's center is the Source position - SimpleSineSynth controlls: - click to enable - scroll vertical -> frequency change - scroll vertical + ctrl-key -> volume/amplitude change
* MovieCube: Restart @ EOSSven Gothel2023-05-182-9/+18
|
* Common av classes (*AudioSink, ..) are promoted to gluegen (commit ↵Sven Gothel2023-05-171-1/+1
| | | | 270172bcbd91f96d4a38a3d73e23d744f57a25b8) and joal (commit 03f4bb63ce8a358b1c2ef303480e1887d72ecb2e)
* Fix MovieSimpleActivity1: Adjust to GLMediaPlayer API change (commit ↵Sven Gothel2023-05-151-11/+12
| | | | | | 9a7b9768e2e018a33ca44a170f372fee84c26a27) Was missing ..
* GLMediaPlayer: Replace GLMediaEventListener.EVENT_CHANGE_* 'int event_mask' ↵Sven Gothel2023-05-097-70/+59
| | | | with EventMask.Bit/EventMask
* GraphUI Working GridLayout w/ and w/o cell-size and alignment; Added BoxLayout.Sven Gothel2023-04-297-97/+698
|
* GraphUI GraphShape: Apply {update->reset}GLRegion()Sven Gothel2023-04-285-5/+5
| | | | See commit 386f9652e0169b0aa7f6ead1bf230d5d67d00a38
* GraphUI GraphShape: createGLRegion() -> updateGLRegion(), called by ↵Sven Gothel2023-04-207-16/+35
| | | | | | | | | | | | | | | | | | | | | | addShapeToRegion() impl to utilize OutlineShape -> GLRegion ctor w/ proper buffer-size This way we avoid unnecessary buffer growth and allow creation of 'always' fitting buffer sizes. +++ Update or freshly create the GLRegion, while allocating its buffers with given initial `vertexCount` and `indexCount`. Method shall be invoked by the addShapeToRegion(GLProfile, GL2ES2) implementation before actually adding the OutlineShape to the GLRegion. addShapeToRegion(GLProfile, GL2ES2) is capable to determine initial `vertexCount` and `indexCount` buffer sizes, as it composes the OutlineShapes to be added. updateGLRegion(GLProfile, GL2ES2, TextureSequence, OutlineShape) maybe used for convenience. In case GLRegion is `null`, a new instance is being created. In case the GLRegion already exists, it will be either cleared if the GL2ES2 `gl` instance is not `null` or earmarked for deletion at a later time and a new instance is being created.
* Graph GLRegion/TextRegionUtil: Enhance pre-determination of buffer-size, ↵Sven Gothel2023-04-207-17/+15
| | | | | | | | | | increase default initial 16->64 (unsued) - Region.countOutlineShape(..) now returns unpatched 3*triangle value for indices, avoiding grow - TextRegionUtil.addStringToRegion() uses countStringRegion(..) per default - Added GLRegion.create(.., OutlineShape) for convenience, using Region.countOutlineShape(..) - Refined API doc -
* Graph OutlineShape.get{Outline->}VectexCount() renamedSven Gothel2023-04-201-1/+1
|
* GraphUI {Round->Base}Button, denoting perpendicular or round corners (aka ↵Sven Gothel2023-04-192-12/+12
| | | | | | | | rectangle or oval shape) - Button + BaseButton setter also pass this for chaining - Button {twoPassLabel->label}ZOffset, investigate whether z-offset still required (not if blending is enabled!) -
* GraphUI: Add BoxLayout and Margin, todo: Have GridLayout properly use Gap w/ ↵Sven Gothel2023-04-181-0/+225
| | | | Padding and alignment (Margin?) (CSS alike)
* GraphUI Padding: Use CSS alike ctor semantics, hence swizzle ctor argumentsSven Gothel2023-04-183-48/+5
|
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-1811-14/+15
| | | | | | | | | | | instead of float[] and remove unused VectorUtil methods After Matrix4f consolidation and proving same or better performance on non array types, this enhances code readability, simplifies API, reduces bugs and may improve performance. GraphUI: - Have RoundButton as a functional class to make a round or rectangular backdrop, i.e. impl. addShapeToRegion() via reused addRoundShapeToRegion()
* GraphUI Demos: Move GraphUIDemoArgs to sub-package utilSven Gothel2023-04-189-2/+9
|
* GraphUI Demo FontView01: Add font-name and selected glyphID to screenshot ↵Sven Gothel2023-04-141-4/+8
| | | | filename (documentation)
* GraphUI Demo FontView01: Add screenshot per selected GlyphSven Gothel2023-04-141-6/+9
|
* GraphUI Demo FontView01: Separate general font metrix (height, line-height) ↵Sven Gothel2023-04-141-3/+3
| | | | from actual Glyph metrix
* GraphUI Demo FontView01: Add 'infoGrid' w/ GlyphShape (-> DAG SG reusing ↵Sven Gothel2023-04-141-21/+106
| | | | | | | | | | instance) + details in text, active via mouse-click The GlyphShape instance will be reused in this use-case, i.e. once in the 'mainGrid' and if selected, in the 'infoGrid'. This also demos our DAG capability. Further textual details are also shown in the text label.
* GraphUI Demo/Test: FontView[Listener]01: Use 10 'mmPerCell', Monitor ↵Sven Gothel2023-04-141-40/+46
| | | | resolution independent for display same size.
* GraphUI Demo FontView01: Use full window size if grid is not otherwise ↵Sven Gothel2023-04-141-13/+25
| | | | defined and scale group accordingly
* GraphUI Demos: Use new Scene.screenshot(.. screen.nextScreenShotFile(..))Sven Gothel2023-04-144-9/+6
|
* GraphUI Scene.screenshot(): Add convenient variant to be executed on-display ↵Sven Gothel2023-04-134-17/+7
| | | | call. FontView stays open and issues a screenshot.
* GraphUI Demos: Adding prelim FontView01, which may become a 'little ↵Sven Gothel2023-04-134-3/+196
| | | | FontForge' ;-)
* GraphUI Demos: Fix var-name typo, its velocitySven Gothel2023-04-136-16/+16
| | | | .. or how to propagate a typo from an initial test case to all of 'em ;-)
* GraphUI GridLayout: Functional Grid Layout w/ Padding, demo'ed in ↵Sven Gothel2023-04-122-149/+150
| | | | | | | | | | UISceneDemo20 with button Groups All layout magic is simply performed in Group.Layout.layout(..) @ validate, incl. updating the bounding box to have the padding included. This demonstrates GraphUI's capability to be used with correct layout, i.e. its pure matrix based position, scale and rotation.
* GraphUI Demos: Use GraphUIDemoArgs for UISceneDemo1[01]Sven Gothel2023-04-122-58/+42
|
* GraphUI UISceneDemo03b: Action with the Glyph Group Container: Rotate auto ↵Sven Gothel2023-04-101-0/+537
| | | | and w/ scroll-wheel (or zoom if alt is pressed)
* GraphUI UISceneDemo03: Use Group as a Container to hold all Glyphs and have ↵Sven Gothel2023-04-101-6/+12
| | | | them no more interacting when arrived. Play: Drag 'em ;-)
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-092-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | invPMv null; PMVMatrix: Make Mvi, Mvit optional at ctor, add user PMv and PMvi - used at gluUnProject() .. Matrix4f.mapWin*() variants w/ invPMv don't need temp matrices, they also shall handle null invPMv -> return false to streamline usage w/ PMVMatrix if inversion failed. PMVMatrix adds user space common premultiplies Pmv and Pmvi on demand like Frustum. These are commonly required for e.g. gluUnProject(..)/mapWinToObj(..) and might benefit from caching if stack is maintained and no modification occured. PMVMatrix now has the shader related Mvi and Mvit optional at construction(!), so its backing buffers. This reduces footprint for other use cases. The 2nd temp matrix is also on-demand, to reduce footprint for certain use cases. Removed public access to temporary storage. +++ While these additional matrices are on demand and/or at request @ ctor, general memory footprint is reduced per default and hence deemed acceptable while still having PMVMatrix acting as a core flexible matrix provider.
* GraphUI Demos: Use GraphUIDemoArgsSven Gothel2023-04-083-30/+27
|
* GraphUI: Adjust for rotation: Drag-resize and -move (flip x- and/or y-axix), ↵Sven Gothel2023-04-082-1/+250
| | | | | | as well as getSurfaceSize(..) (use absolute size) Tested w/ UISceneDemo01b and UISceneDemo03, where you now can pick any moving glyph at any rotation and drag it.
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-0714-77/+89
| | | | | | | | | | | | | | | | | Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) Big Easter Cleanup - Net -214 lines of code, despite new classes. - GLUniformData buffer can be synced w/ underlying data via SyncAction/SyncBuffer, e.g. SyncMatrix4f + SyncMatrices4f - PMVMatrix rewrite using Matrix4f and providing SyncMatrix4f/Matrices4f to sync w/ GLUniformData - Additional SyncMatrix4f16 + SyncMatrices4f16 covering Matrix4f sync w/ GLUniformData w/o PMVMatrix - Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) - Moved FloatUtil -> Matrix4f, kept a few basic matrix ops for ProjectFloat - Most, if not all, float[] and int[] should have been moved to proper classes - int[] -> Recti for viewport rectangle - Matrix4f and PMVMatrix is covered by math unit tests (as was FloatUtil before) -> save Passed all unit tests on AMD64 GNU/Linux
* GraphUI: Adopting Vec*f API; Adding Group; Scene + Group are Container, ↵Sven Gothel2023-04-059-59/+301
| | | | | | | | | | | | | | | | traversing the PMVMatrix throughout childs (-> see TreeTool). Utilizing the Vec*f (and Matrix4f) API w/ AABBox et al renders our code more clean & safe, see commit 15e60161787224e85172685f74dc0ac195969b51. A Group allows to contain multiple Shapes, hence the PMVMatrix must be traversed accordingly using TreeTool for all operations (draw, picking, win->obj coordinates, ..). Hence Scene + Group are now implementing Container and reuse code via TreeTool and a Shape.Visitor*. This will allow further simplification of user code.
* Math: Complete Matrix4f w/ Vec[234]f and adopt it throughout Quaternion, ↵Sven Gothel2023-04-055-72/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ray, AABBox, Frustum, Stereo*, ... adding hook to PMVMatrix Motivation was to simplify matrix + vector math usage, ease review and avoid usage bugs. Matrix4f implementation uses dedicated float fields instead of an array. Performance didn't increase much, as JVM >= 11(?) has some optimizations to drop the array bounds check. AMD64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~3% slower than FloatUtil.multMatrix(a, b, dest) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~3% slower than FloatUtil.invertMatrix(..) RaspberryPi 4b aarch64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~20% slower than FloatUtil.multMatrix(a, b) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~4% slower than FloatUtil.invertMatrix(..) Conclusion - Matrix4f.mul(b) needs to be revised (esp for aarch64) - Matrix4f.invert(..) should also not be slower ..
* GraphUI: Relocate com.jogamp.graph.ui.gl.* -> com.jogamp.graph.ui.*, resolve ↵Sven Gothel2023-03-3113-40/+40
| | | | | | GL/VK abstraction at a later time differently Actual GPU rendering toolkit dependency can be abstracted differently, i.e. GPU <- { GL, VK } etc.