diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 19 |
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 ) { |