From 7cba3e8e8bc0f224cc4be8bd1290068ed5429365 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 27 Aug 2023 13:07:26 +0200 Subject: GraphUI: Button: Reduce default DEFAULT_LABEL_ZOFFSET from 0.005f -> 0.0001f, have to check if working on all platforms (TODO) Otherwise, we have to resolve the 'one Region' for the Button (backgroung shape + text on top) implementation with two OutlineShapes. As of now, we use the z-offset of the text above background to avoid z-fighting. This is like a manual application of glPolygonOffset(..) directly on the produced vertices. --- src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java') diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java index 5fe99c5c9..9ce04cb47 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java @@ -60,7 +60,7 @@ public class Button extends BaseButton { /** {@value} */ public static final float DEFAULT_SPACING_Y = 0.42f; - private static final float DEFAULT_LABEL_ZOFFSET = 0.005f; // 0.05f; + private static final float DEFAULT_LABEL_ZOFFSET = 0.0001f; // 0.05f; private float labelZOffset; private final Label0 label; -- cgit v1.2.3