| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
version, overcome float precision; Loop: Pass edgeType not Winding, simplify findClosestValidNeighbor() -> isValidNeighbor(); CDTriangulator2D.addCurve() enforces Winding.CCW on BOUNDARY null == loop case
Add double version of triAreaVec2() and isInCircleVec2() in VectorUtil, overcoming float precision limits
- Analysis exposed float precision limits within isInCircleVec2()
Loop: Pass edgeType not Winding, simplify findClosestValidNeighbor() -> isValidNeighbor()
- Enhance code clarity
CDTriangulator2D.addCurve() enforces Winding.CCW on BOUNDARY null == loop case
|
|
|
|
|
|
|
|
|
| |
Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT to TextureSequence and add enabling/disabling of aratio adjustment + letter-box back-color
TextureSequence color-texture params fetched from Graph VBORegion* and fed into shader.
This allows more flexibility in aspect-ratio adjustment as well as setting a clipping background color for
the added letter-box space.
|
|
|
|
| |
alpha 0 instead of the debug color white vec4(1), which leads to the white seam if out of gcu_ColorTexBBox
|
|
|
|
| |
oops
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Frustum mapping + GraphUI Support
AABBox clipping naturally couldn't be transformed into 3D Model-View (Mv) Space,
as it is axis aligned and only provided 2 points (min/max).
Therefor we map the Group's AABBox to a 8-point Cube,
perform the Mv-transformation and then produce the 6-plane Frustum.
As before, we cull fully outside shapes within the Group's draw method
and perform fragment clipping with same Frustum planes in the shader.
With clipping enabled, the 3D z-axis getBounds() depth
will be slightly increased for functional Frustum operation.
This is also done for setFixedSize(Vec2f).
The Frustum planes are copied to the Graph shader
via float[4*6] -> uniform vec4 gcu_ClipFrustum[6]; // L, R, B, T, N, F each {n.x, n.y, n.z, d}
+++
Concludes related work of below commits
- 1040bed4ecc6f4598ea459f1073a9240583fc3c3
- 5cca51e32999a882e2a5f00cb45ecafc824ffd86
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RegionRenderer's RenderState usually rarely set from top of user API, reducing complexity.
Discussion:
Alternative was to pass AA-Quality same as SampleCount from the top (e.g. GraphUI Scene),
however, this convolutes the API even more.
Both parameter modify the resulting shader code in pass2 rendering (only).
The used 'renderMode' is still maintained within the Region,
since it contains more dynamic states individual to each Region instance (color-texture, ..).
This despite 'renderMode' also changes the RenderState's shader program.
In the end, it really doesn't matter and is a choice of frequency - the pipeline is
usually rendering from on OpenGL rendering thread sequentially.
AA-Quality and SampleCount simply usually don't change that often
and are set only once.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass2-AA, revise Pass2 AA Quality parameter ..
Misc:
- Graph VBORegion2PVBAAES2: Drop unused FBO rescale
- Move MIN/MAX QUALITY/SAMPLE from GraphUI Scene -> Graph Region
+++
Quality -> Pass2 AA Quality
- Drop quality field in region
- Pass quality to GLRegion.draw(..) similar to sampleCount
for dynamic shader and switch
- TODO: Pass quality parameter in TextRegionUtil's functions
Fix RegionRenderer Shader Mapping
- Use ShaderKey class to properly implement the hash value and equals method
- For this, TextureSequence.getTextureFragmentShaderHashID() has been added
to provide actual shader-snippet for the equals function
- All required criterias are included in the hash value and equals method
Fix AABBox Clipping for Pass-2 AA
- Clipping in pass2-AA must happen in pass2 on actual gcu_PMVMatrix01 (not ortho)
+++
GraphUI GraphShape
- Rename: [get,set]{->AA}Quality()
GraphUI Scene
- Rename: mark{All->}ShapesDirty(), set{AllShapes->}Sharpness(), set{AllShapes->AA}Quality()
- Fix setSampleCount(..), i.e. markStatesDirty() not markShapesDirty()
- Fix setAAQuality(), markShapesDirty() and markStatesDirty(): Use forAll(..) to traverse through all shapes and groups.
GraphUI Group
- Add setFixedSize()
- Add setClipOnBox()
- Document setRelayoutOnDirtyShapes(), isShapeDirty()
|
|
|
|
| |
use winHeight (typo)
|
|
|
|
|
|
| |
- GLSL vertex shader sets smooth varying 'gcv_ClipBBoxCoord' w/ Mv multiplied vertex-coord
- RegionRenderer.setClipBBox(AABBox) expects a pre-multiplied Mv AABBox covering an independent area, not per Shape/Region.
- This works as expected with moving/scaling of each Shape/Region etc
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Convenient using Graph/GraphUI produced AABBox)
Simple demo, setting clip-bbox manually:
- src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeClippingDemo00.java
TODO:
- GLSL: Add missing Mv-multiplication of vertex-position -> gcv_ClipBBoxCoord
-- AABBox min/max should be set pre-multiplied w/ Mv covering an independent area, not per Shape/Region.
-- This to properly work with moving/scaling of each Shape/Region etc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
min/max vec3 as convenient using Graph/GraphUI produced AABBox
USE_AABBOX_CLIPPING
- Conditional compilation w/ macro 'USE_AABBOX_CLIPPING'
- gcv_ClipBBoxCoord smooth varying setup in vertex shader
- fragment shader clips via branch
if( is_inside(gcv_ClipBBoxCoord, gcu_ClipBBox[0], gcu_ClipBBox[1]) < 0.5 ) { CLIP }
- clipping via discard or alpha=0 in case of buggy-discard.
Other optimization:
- Drop gcv_ColorTexExt, fragment-shader uses gcu_ColorTexBBox[2] directly (flat)
- Simplified gcv_ColorTexCoord smooth varying equation in vertex shader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'and'/'or' semantic (swapped); Add EPSILON in clip_coord(..) and add is_inside(..) function
Complete overload vec2 and vec3 variants
Fix 'and'/'or' semantic (swapped)
- 'and' uses multiplication, i.e. all arguments must be > 0 (ideally 1)
- 'or' uses addition, i.e. only one arguments must be > 0 (ideally 1)
- both uses clamp [0..1]
Add EPSILON in clip_coord(..)
- Only 'coord > high+EPSILON' is outside
Add is_inside(..) function
- Similar to clip_coord(..) but returns float 0 or 1
instead of selecting color.
|
|
|
|
| |
'curverenderer01-pass1.vp' (commit 297c48f4fefd1ab59800524ea5f0dd56684d6786)
|
|
|
|
| |
instead hard coded branch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing
Bug 1465: Region currently simply bloats a given texture to its region AABBox,
which renders textures with the wrong aspect ratio.
Add facility to program the texture-coordinates to either letter-box
or scaled-up (and cut) true aspect-ratio.
Default shall be zoom (scale-up and cut),
but user shall be able to set a flag in the Region for letter-box.
Have the shader clip texture coordinates properly,
best w/o branching to soothe performance.
See functions.glsl
+++
Bug 1466: Current color mix: texture * color_channel * color_static
is useless in GraphUI.
color_static shall modulate the texture, which works.
But in case of color_channel (attribute/varying)
we want it to be mixed so it can become the more dominant color
for e.g. a border.
Desired is:
color = vec4( mix( tex.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ),
mix( tex.a * gcu_ColorStatic.a, 1, gcv_Color.a) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
agnostic (PMVMatrix, Matrix4f, Vec4f, ..)
Math functionality (PMVMatrix, Matrix4f, Vec4f, ..)
- shall be used toolkit agnostic, e.g. independent from OpenGL
- shall be reused within our upcoming Vulkan implementation
- may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed.
The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData
via the toolkit agnostic SyncAction and SyncBuffer
shall also be split to a toolkit agnostic variant.
An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist,
being derived from the toolkit agnostic base implementation.
+++
Initial commit .. compile clean, passing most unit tests.
|
|
|
|
| |
certain debug output to keep most silence for debugAll()
|
|
|
|
| |
texture unit after ctor
|
|
|
|
|
|
|
|
|
|
|
| |
and the optional colors (GPU effeciency and performance; Increased CPU buffer growth performance)
Besides simplification, interleaved GPU memory boosts
- effeciency
- performance
Since only one underlying backing buffer on the CPU (host) has to be managed,
it also increases buffer growth performance.
|
|
|
|
| |
BITHINT_GLOBAL_DEPTH_TEST_ENABLED usage -> To be investigated.
|
|
|
|
| |
all related methods. Add growCount stat.
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
discard, even though technically allowed (ignored after discard)
|
|
|
|
|
|
|
|
|
| |
GLRendererQuirks.GLSLBuggyDiscard to avoid overdraw of such regions.
Historically we disabled `discard` due to an old NV tegra2 compiler bug,
which caused the compiler to freeze.
Today we no more seem to have this GLSL compiler issue, i.e. GLRendererQuirks.GLSLBuggyDiscard never gets set.
|
|
|
|
| |
switch by sampleCount; Don't use any resource not requested by curRenderModes
|
|
|
|
|
|
|
|
|
| |
67a723477ecd818fbc5859fe20ee536a3b4efae5 (reverting and clarifying)
All Graph ShaderPrograms used are owned by RegionRenderer, not RenderState nor [GL]Region*,
hence [GL]Region* shall only nullify the resources but not destroy the shader currently in use.
One RegionRenderer maybe used for multuple Regions.
|
|
|
|
| |
and is references.
|
|
|
|
| |
early if not needed (track capacity); Align all VBORegion* buffer init/set/grow impl.
|
|
|
|
| |
addOutlineShape1() (slow perf+debug), rename growBufferSize() -> growBuffer()
|
|
|
|
| |
buffer data-type to directly put[34][sif](..) skipping GLArrayDataClient/Buffers buffer-growth and validations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
indices growBufferSize(); Add GLRegion.create(..) w/ initial vertices/indices count; Up default[VI]Count;
Following heuristcs were found, hence we might want to calculate these for each font (TODO):
/**
* Heuristics with TestTextRendererNEWT00 text_1 + text_2 = 1334 chars
* - FreeSans ~ vertices 64/char, indices 33/char
* - Ubuntu Light ~ vertices 100/char, indices 50/char
* - FreeSerif ~ vertices 115/char, indices 61/char
*
* Now let's assume a minimum of 10 chars will be rendered
*/
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ease GLArrayData* buffer growth.
Using integer indices, i.e. GL_UNSIGNED_INT, requires us to pass a GLProfile 'hint' to the GLRegion ctor.
Region.max_indices is computed in this regard and used in Region.addOutlineShape().
TODO: If exceeding max_indices, the code path needs some work.
Buffer growth is eased via GLArrayData using its golden growth ratio
and manually triggering growth before processing all triangles in Region.addOutlineShape().
+++
TextRegionUtil static drawText() won't clear passed Region anymore, caller has to do this if so intended.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
finalize immutables, add growthFactor (default golden ratio 1.618), add getCapacity*() and printStats(..)
The growthFactor becomes essential for better growth behavior and can be set via setGrowthFactor().
The other changes were merely to clean up the GLArrayData interface and its 4 implementations.
Not great to change its API, but one name was misleading ['getComponentCount' -> 'getCompsPerEleme'],
so overall .. readability is enhanced.
Motivation for this change was the performance analysis and improvement of our Graph Curve Renderer.
|
|
|
|
|
|
|
|
|
| |
sed -i 's/javax\.media\.opengl/com\.jogamp\.opengl/g' `grep -Rl "javax\.media\.opengl" src`
sed -i 's/javax\.media\.nativewindow/com\.jogamp\.nativewindow/g' `grep -Rl "javax\.media\.nativewindow" src`
sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" src`
sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" doc`
Manually edited all occurences within make/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix depth- and stencil bit count selection for attachRenderbuffer(..)
- Add generic values: DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS, MAXIMUM_BITS
- Refactor depth- and stencil bit-count -> format into own method
- Allow depth- and stencil bit-count select a higher bit-count if required (fix)
- GLFBODrawable.FBOMODE_USE_DEPTH is deprecated, using GLCapabilities.[get|set]DepthBits(..)
- It was an oversight to introduce the bit flag in the first place,
since we should have used the capabilities depth bit-count
- Graph Test: GLEventListenerButton shall use requested capabilities for FBO drawable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resetSamplingSink(..) if required; Fix resetSamplingSink(..), isBound(), ..
- Simplify API (init/reset)
- use new unique methods for init and reset:
- void init(final GL gl, final int newWidth, final int newHeight, final int newSamples)
- does not issue resetSamplingSink(..)
- boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples)
- always issues resetSamplingSink(..)
- deprecated dual-use (init/reset):
- boolean reset(final GL gl, final int newWidth, final int newHeight)
- boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink)
- reset(..) no more creates a dummy 'samplingSink' instance if sampling > 0,
left up to resetSamplingSink(..)
- Track 'modified' state of FBObject,
if size, format or any attachment has been changed since last
- use(..)
- syncSamplingSink(..)
- resetSamplingSink(..)
- Only issue resetSamplingSink(..) from syncSamplingSink(..)/use(..)
if 'modified == true'
+++
- Fix setSamplingSink(..), i.e. samplingSink state handling:
- Validated whether given samplingSink is initialized,
throws Exception if not.
- Fix resetSamplingSink(..)
- resets the bound state, i.e. leaves it untouched
- also unbinds the samplingSink
- sampleSinkDepthStencilMismatch() also returns true if
this.depth/stencil == null, but samplingSink is not.
- Newly created colorbuffer/-texture matches
exiting colorbuffer's internal-format, if exists.
- Using simplified resetSizeImpl(..) for size mismatch
- Simplified samplingColorSink init check
- Fix isBound()
was: 'bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)'
fix: 'bound = bound && fbName == gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)'
- Fix detachRenderbuffer(..) validates whether detachment was successful,
similar to detachColorbuffer(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for a Colorbuffer, also make DEPTH optional.
API Change
+++
In certain cases a TextureAttachment for the FBO's color buffer
is not desired, either for performance reasons where texture functionality
is not required or to avoid texture restrictions like size, etc.
+++
GLFBODrawable shall use TextureAttachment for the FBO's color buffer
and a DEPTH buffer per default.
However, the user shall be allowed to use a plain ColorAttachment (renderbuffer)
and also no DEPTH buffer.
+++
FBObject Details:
- Colorbuffer interface exposes Attachment details
like format, size, etc as well as it's implementation
specifics, isTextureAttachment() and getTextureAttachment() allowing a clean cast and type query.
- Allow ColorAttachment to be used for non MSAA
- Make TextureAttachment optional for method 'use(GL, TextureAttachment)'
- Only validate size against MAX_TEXTURESIZE if using a TextureAttachment
- API Change:
- rename: getColorAttachmentCount() -> getColorbufferCount()
- add: getTextureAttachmentCount()
- change 'TextureAttachment getSamplingSink()' -> 'Colorbuffer getSamplingSink()'
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or due branching)
- AWT TextRenderer: Add throw new InternalError("fontRenderContext never initialized!"); FIXME!
- GLContextImpl.hasFBOImpl(): Fix serious NPE issue if extCache is null
- GLDrawableFactoryImpl.createOffscreenDrawableImpl(..):
- Fix NPE issue w/ null drawable
- Fix resetting GammaRamp by ensuring originalGammaRamp will be set at 1st setGammaRamp(..)
- AndroidGLMediaPlayerAPI14: Fix NPE: Use already resolved local referenced
- EGLDrawableFactory: Fix NPE: Only operate on non null surface!
- ALAudioSink.dequeueBuffer(..): Only resolve releasedBuffer elements if not null
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variations; PMVMatrix: Remove NIO buffer path, use backing-array only and FloatUtil direct.
- FloatUtil pptimized variants:
- mapObjToWinCoords (gluProject) passing 'P x Mv' for batch operations
- mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' for batch operations
- mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' and two winz values
for two ray picking resulting in two obj positions. (-> mapWinToRay)
- PMVMatrix
- dropped low performance NIO mode
- simply use common backing-array and fixed offsets directly
- drop ProjectFloat usage in favor of FloatUtil
- reduce number of temporary arrays
|
|
|
|
|
|
| |
Macro redefine 'texture2D -> texture'
was added _after_ the custom texture lookup insertion
causing GL3-core to fail.
|
|
|
|
| |
SAMPLE_COUNT is of type 'int'
|