diff options
author | Sven Göthel <[email protected]> | 2024-01-15 04:47:34 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-15 04:47:34 +0100 |
commit | d7cb4a77b71cb3703ff7ac0667c5a97f29a5bdb4 (patch) | |
tree | 17cb67b7867f0da11a2717492d691a5e96f52636 /src/graphui/classes/com/jogamp/graph/ui/GraphShape.java | |
parent | 9b8d1825cfb76454e42b196a93dc54d189a8a9a6 (diff) |
Graph/GraphUI AA-Quality (shader): Region: Add DEFAULT_AA_QUALITY and clipping funs for aaQuality/sampleCount; TextRegionUtil: Pass quality parameter in draw-functions
Region.DEFAULT_AA_QUALITY defaults to MAX_AA_QUALITY still
- TODO: AA shader is subject to change ..
Region.draw(..) clips the quality param (save)
TextRegionUtil: Pass quality parameter in draw-functions
- Allowing to select the AA shader
GraphUI Scene and some demos add the AA-quality param
to the status line or screenshot-filename.
- See Region.getRenderModeString(..)
+++
TestTextRendererNEWT20 and TestTextRendererNEWT21
now iterate through all fonts, AA-quality shader and sample-sizes.
Most demos and some more tests take AA-quality into acount,
demos via CommandlineOptions.graphAAQuality
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/GraphShape.java')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/GraphShape.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java b/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java index 1e00d72f7..65363fa2b 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 regionPass2Quality = Region.MAX_AA_QUALITY; + private int regionPass2Quality = Region.DEFAULT_AA_QUALITY; private final List<GLRegion> dirtyRegions = new ArrayList<GLRegion>(); /** @@ -87,16 +87,22 @@ public abstract class GraphShape extends Shape { public final int getRenderModes() { return renderModes; } /** - * 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}. + * Sets the shape's Graph {@link Region}'s pass2 AA-quality parameter. Default is {@link Region#DEFAULT_AA_QUALITY}. + * @param v Graph {@link Region}'s pass2 AA-quality parameter, default is {@link Region#DEFAULT_AA_QUALITY}. * @return this shape for chaining. */ - public final GraphShape setAAQuality(final int q) { - this.regionPass2Quality = q; + public final GraphShape setAAQuality(final int v) { + this.regionPass2Quality = Region.clipAAQuality(v); markStateDirty(); return this; } + /** + * Return the shape's Graph {@link Region}'s quality parameter. + * @see #setAAQuality(int) + */ + public final int getAAQuality() { return regionPass2Quality; } + /** Set the 2nd pass texture unit. */ public void setTextureUnit(final int pass2TexUnit) { this.pass2TexUnit = pass2TexUnit; @@ -106,12 +112,6 @@ public abstract class GraphShape extends Shape { } /** - * Return the shape's Graph {@link Region}'s quality parameter. - * @see #setAAQuality(int) - */ - public final int getAAQuality() { return regionPass2Quality; } - - /** * Sets the shape's Graph {@link OutlineShape}'s sharpness parameter. Default is {@link OutlineShape#DEFAULT_SHARPNESS}. * * Method issues {@link #markShapeDirty()}. @@ -228,7 +228,7 @@ public abstract class GraphShape extends Shape { } @Override - protected final void validateImpl(final GLProfile glp, final GL2ES2 gl) { + protected final void validateImpl(final GL2ES2 gl, final GLProfile glp) { if( null != gl ) { clearDirtyRegions(gl); } |