From 9fd84fa482aa354f0636fcd006edd7b71b27c02d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 13 Mar 2023 06:03:28 +0100 Subject: GraphUI: Use pre-calc'ing buffer sizes for Label shape --- src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/graphui') diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java index 4af782a37..ab1d08872 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java @@ -28,8 +28,10 @@ package com.jogamp.graph.ui.gl.shapes; import com.jogamp.opengl.GL2ES2; +import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.math.geom.AABBox; import com.jogamp.graph.curve.OutlineShape; +import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.font.Font; import com.jogamp.graph.geom.Vertex; @@ -104,6 +106,11 @@ public class Label extends Shape { markShapeDirty(); } + @Override + protected GLRegion createGLRegion(final GLProfile glp) { + return GLRegion.create(glp, getRenderModes(), null, font, text); + } + @Override protected void clearImpl(final GL2ES2 gl, final RegionRenderer renderer) { } -- cgit v1.2.3