diff options
author | Sven Göthel <[email protected]> | 2024-01-14 04:19:10 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-14 04:19:10 +0100 |
commit | 6363ae5fb6975a6f2e7c1093ce81f25b699e3e61 (patch) | |
tree | e19fb3347ea0562972c87b6b6fbbf771933646ae /src/graphui/classes/com/jogamp/graph/ui/GraphShape.java | |
parent | 3062f72c7b83cef71d8e6d471846449aba66d861 (diff) |
Graph/GraphUI: Revise Graph Region ShaderMapping, fix AABBox-Clipping for 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()
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/GraphShape.java')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/GraphShape.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java b/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java index 869d63ec7..27e231aa5 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java @@ -58,7 +58,7 @@ public abstract class GraphShape extends Shape { protected int pass2TexUnit = GLRegion.DEFAULT_TWO_PASS_TEXTURE_UNIT; protected GLRegion region = null; protected float oshapeSharpness = OutlineShape.DEFAULT_SHARPNESS; - private int regionQuality = Region.MAX_QUALITY; + private int regionPass2Quality = Region.MAX_AA_QUALITY; private final List<GLRegion> dirtyRegions = new ArrayList<GLRegion>(); /** @@ -87,15 +87,13 @@ public abstract class GraphShape extends Shape { public final int getRenderModes() { return renderModes; } /** - * Sets the shape's Graph {@link Region}'s quality parameter. Default is {@link Region#MAX_QUALITY}. - * @param q Graph {@link Region}'s quality parameter, default is {@link Region#MAX_QUALITY}. + * Sets the shape's Graph {@link Region}'s pass2 AA-quality parameter. Default is {@link Region#MAX_AA_QUALITY}. + * @param q Graph {@link Region}'s pass2 AA-quality parameter, default is {@link Region#MAX_AA_QUALITY}. * @return this shape for chaining. */ - public final GraphShape setQuality(final int q) { - this.regionQuality = q; - if( null != region ) { - region.setQuality(q); - } + public final GraphShape setAAQuality(final int q) { + this.regionPass2Quality = q; + markStateDirty(); return this; } @@ -109,9 +107,9 @@ public abstract class GraphShape extends Shape { /** * Return the shape's Graph {@link Region}'s quality parameter. - * @see #setQuality(int) + * @see #setAAQuality(int) */ - public final int getQuality() { return regionQuality; } + public final int getAAQuality() { return regionPass2Quality; } /** * Sets the shape's Graph {@link OutlineShape}'s sharpness parameter. Default is {@link OutlineShape#DEFAULT_SHARPNESS}. @@ -168,12 +166,12 @@ public abstract class GraphShape extends Shape { @Override protected final void drawImpl0(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount, final Vec4f rgba) { renderer.setColorStatic(rgba); - region.draw(gl, renderer, sampleCount); + region.draw(gl, renderer, regionPass2Quality, sampleCount); } @Override protected final void drawToSelectImpl0(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { - region.draw(gl, renderer, sampleCount); + region.draw(gl, renderer, 0, sampleCount); } /** @@ -252,7 +250,6 @@ public abstract class GraphShape extends Shape { box.resize(h.x() + p.right, h.y() + p.top, l.z()); setRotationPivot( box.getCenter() ); } - region.setQuality(regionQuality); } else if( isStateDirty() ) { region.markStateDirty(); } |