summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-19 07:14:57 +0100
committerSven Gothel <[email protected]>2023-03-19 07:14:57 +0100
commitc37c96ce30b7fcdbaf9d6b682729edb43a139d0d (patch)
treedfa7aec17d0519439afb309575b78f37b8df123c /src/jogl/classes
parenta6b57c0a3751f37b425e0bd69155d3dbab7e147c (diff)
Graph: Add RegionRenderer.enable(..) variant w/ passing enable + disable GLCallback
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
index 3c14b1bab..28be06eee 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -336,13 +336,24 @@ public final class RegionRenderer {
* @see RenderState#getShaderProgram()
*/
public final void enable(final GL2ES2 gl, final boolean enable) {
+ enable(gl, enable, enableCallback, disableCallback);
+ }
+
+ /**
+ * Same as {@link #enable(GL2ES2, boolean)} but allowing to force {@link GLCallback}s off.
+ * @param gl current GL object
+ * @param enable if true enable the current {@link ShaderProgram}, otherwise disable.
+ * @param doCallbacks if true (default) perform {@link GLCallback}s, otherwise don't.
+ * @see #enable(GL2ES2, boolean)
+ */
+ public final void enable(final GL2ES2 gl, final boolean enable, final GLCallback enableCB, final GLCallback disableCB) {
if( enable ) {
- if( null != enableCallback ) {
- enableCallback.run(gl, this);
+ if( null != enableCB ) {
+ enableCB.run(gl, this);
}
} else {
- if( null != disableCallback ) {
- disableCallback.run(gl, this);
+ if( null != disableCB ) {
+ disableCB.run(gl, this);
}
}
if( !enable ) {