diff options
author | Sven Göthel <[email protected]> | 2024-02-13 22:21:55 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-13 22:21:55 +0100 |
commit | 06e5b0503a0b32b8b1e5985a9da0d5373f8b7096 (patch) | |
tree | 5d644e73e01bcfa00b71488c4701acbd9b63d84a /src/demos | |
parent | 101ec44f9d6df7faa0695accccfd43f51e48e7a4 (diff) |
Bug 1501: Graph Shape: onInit(ListenerBool) -> onDraw(DrawListener) w/ added capability for code injection to render
Besides the one-shot on-init functionality, this allows us to re-render the shape differently.
Diffstat (limited to 'src/demos')
-rw-r--r-- | src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java index fe47db823..dfd6f55e7 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java @@ -40,6 +40,7 @@ import com.jogamp.common.net.Uri; import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.VersionUtil; import com.jogamp.graph.curve.Region; +import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.RenderState; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; @@ -733,7 +734,7 @@ public class UISceneDemo20 implements GLEventListener { setSoundPosition(shape, aSink.getContext(), aSink.getSource()); } } ); - button.onInit( (final Shape shape) -> { + button.onDraw( (final Shape shape, final GL2ES2 gl_, final RegionRenderer renderer_) -> { final ALAudioSink aSink = alAudioSink[0]; if( null != aSink && aSink.getContext().isValid() ) { initSound(shape, aSink.getContext(), aSink.getSource()); @@ -804,7 +805,7 @@ public class UISceneDemo20 implements GLEventListener { System.err.println("Sine "+sineSound); } } ); - button.onInit( (final Shape shape) -> { + button.onDraw( (final Shape shape, final GL2ES2 gl_, final RegionRenderer renderer_) -> { if( null != aSink && aSink.getContext().isValid() ) { initSound(shape, aSink.getContext(), aSource); System.err.println("Sine Audio: "+aSink); |