From 9a9309c7bf2b5edc27b5f84bee547c5bf0539010 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 20 Mar 2023 14:23:01 +0100 Subject: GraphUI Scene: Add getDefaultVertexFactory(), fix getRenderState() API doc (can't be null) --- src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/graphui/classes/com/jogamp/graph') diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java index 5c5fc25b9..16e5c736f 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java @@ -117,8 +117,11 @@ public final class Scene implements GLEventListener { private GLAutoDrawable cDrawable = null; + /** Returns the default Vertex.Factory. */ + public static Vertex.Factory getDefaultVertexFactory() { return SVertex.factory(); } + private static RegionRenderer createRenderer() { - return RegionRenderer.create(SVertex.factory(), RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable); + return RegionRenderer.create(getDefaultVertexFactory(), RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable); } /** @@ -144,9 +147,10 @@ public final class Scene implements GLEventListener { /** Returns the associated RegionRenderer */ public RegionRenderer getRenderer() { return renderer; } - /** Returns the associated RegionRenderer's RenderState, may be null. */ + /** Returns the associated RegionRenderer's RenderState. */ public RenderState getRenderState() { return renderer.getRenderState(); } + /** Returns the used Vertex.Factory, as used by Region and RegionRenderer. */ public final Vertex.Factory getVertexFactory() { return renderer.getRenderState().getVertexFactory(); } /** -- cgit v1.2.3