aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-20 14:23:01 +0100
committerSven Gothel <[email protected]>2023-03-20 14:23:01 +0100
commit9a9309c7bf2b5edc27b5f84bee547c5bf0539010 (patch)
tree1025d8ac541cd1280e06a8229969cc6347c1f4aa
parentaf201b19064d2526743c89c218a51b0a3ee837c2 (diff)
GraphUI Scene: Add getDefaultVertexFactory(), fix getRenderState() API doc (can't be null)
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java8
1 files changed, 6 insertions, 2 deletions
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<? extends Vertex> 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<? extends Vertex> getVertexFactory() { return renderer.getRenderState().getVertexFactory(); }
/**