aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-16 08:05:27 +0100
committerSven Göthel <[email protected]>2024-01-16 08:05:27 +0100
commit3336d930e991679eadaa1ff4068cb8d23562b42c (patch)
treecaacf6ab6283c6057094d582fc8ce7a530f2853b /src/demos/com/jogamp
parenta8cf4cd506297cd05175e43eeefa4e6d7eabb960 (diff)
GraphUI Enhance Clipping: Drop 'cullingScale' param, a simple intersection-test against 'clipBox' to discard whole shapes if completely outside is enough.
Commit f06fe57b0ae738870a61700ff2c65680102d9e73 turns out addition of using `clipbBox*cullingScale` for the AABBox contains test was not required to render the new Glyphs in the FontView01 demo 'in time'. A simple intersection-test against 'clipBox' to discard shapes if completely outside is enough, hence dropping the 'cullingScale' parameter - simplifying.
Diffstat (limited to 'src/demos/com/jogamp')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
index fafd157ca..6ebf315bf 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
@@ -58,7 +58,6 @@ import com.jogamp.graph.ui.widgets.RangeSlider;
import com.jogamp.graph.ui.widgets.RangedGroup;
import com.jogamp.graph.ui.widgets.RangedGroup.SliderParam;
import com.jogamp.math.Vec2f;
-import com.jogamp.math.Vec3f;
import com.jogamp.math.geom.AABBox;
import com.jogamp.newt.event.KeyAdapter;
import com.jogamp.newt.event.KeyEvent;
@@ -273,13 +272,7 @@ public class FontView01 {
System.err.println("GlyphGrid "+glyphGrid);
System.err.println("GlyphGrid "+glyphGrid.getLayout());
}
- // culling >= 2*cell-size outside of clipping box (vertical only), pixel-accurate clipping in-between until clipping-box
- final Vec3f clipCullingScale = new Vec3f(1f, 1f+2*glyphGridCellSize/glyphGridSize.y(), 1f);
- // final Vec3f clipCullingScale = new Vec3f(1f, 1f, 1f); // no pixel-accurate clipping, just culling in Group
- if( VERBOSE_UI ) {
- System.err.println("RangedGroup clipCullingScale "+clipCullingScale);
- }
- final RangedGroup glyphView = new RangedGroup(options.renderModes, glyphGrid, glyphGridSize, clipCullingScale,
+ final RangedGroup glyphView = new RangedGroup(options.renderModes, glyphGrid, glyphGridSize,
null,
new SliderParam(new Vec2f(glyphGridCellSize/4f, glyphGridSize.y()), glyphGridCellSize/10f, true));
glyphView.getVertSlider().setColor(0.3f, 0.3f, 0.3f, 0.7f);