diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 14 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java | 34 |
2 files changed, 24 insertions, 24 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 87e1c4385..38f4d0dbf 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java @@ -104,14 +104,14 @@ public final class RegionRenderer { public static final GLCallback defaultBlendEnable = new GLCallback() { @Override public void run(final GL gl, final RegionRenderer renderer) { - if( renderer.isHintMaskSet(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) { + if( renderer.hintBitsSet(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) { gl.glDepthMask(false); // gl.glDisable(GL.GL_DEPTH_TEST); // gl.glDepthFunc(GL.GL_ALWAYS); } gl.glEnable(GL.GL_BLEND); gl.glBlendEquation(GL.GL_FUNC_ADD); // default - renderer.setHintMask(RenderState.BITHINT_BLENDING_ENABLED); + renderer.setHintBits(RenderState.BITHINT_BLENDING_ENABLED); } }; @@ -128,9 +128,9 @@ public final class RegionRenderer { public static final GLCallback defaultBlendDisable = new GLCallback() { @Override public void run(final GL gl, final RegionRenderer renderer) { - renderer.clearHintMask(RenderState.BITHINT_BLENDING_ENABLED); + renderer.clearHintBits(RenderState.BITHINT_BLENDING_ENABLED); gl.glDisable(GL.GL_BLEND); - if( renderer.isHintMaskSet(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) { + if( renderer.hintBitsSet(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) { // gl.glEnable(GL.GL_DEPTH_TEST); // gl.glDepthFunc(GL.GL_LESS); gl.glDepthMask(true); @@ -336,11 +336,11 @@ public final class RegionRenderer { /** Returns the optional Mv-premultiplied clipping {@link Frustum} or null if unused. */ public final Frustum getClipFrustum() { return rs.getClipFrustum(); } - public final boolean isHintMaskSet(final int mask) { return rs.isHintMaskSet(mask); } + public final boolean hintBitsSet(final int mask) { return rs.hintBitsSet(mask); } - public final void setHintMask(final int mask) { rs.setHintMask(mask); } + public final void setHintBits(final int mask) { rs.setHintBits(mask); } - public final void clearHintMask(final int mask) { rs.clearHintMask(mask); } + public final void clearHintBits(final int mask) { rs.clearHintBits(mask); } /** * Enabling or disabling the {@link #getRenderState() RenderState}'s diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java index d6be9e07b..4913d8174 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java @@ -54,10 +54,10 @@ public class RenderState { private static final String thisKey = "jogamp.graph.curve.RenderState" ; /** - * Bitfield hint, {@link #isHintMaskSet(int) if set} + * Bitfield hint, {@link #hintBitsSet(int) if set} * stating <i>enabled</i> {@link GL#GL_BLEND}, otherwise <i>disabled</i>. * <p> - * Shall be set via {@link #setHintMask(int)} and cleared via {@link #clearHintMask(int)}. + * Shall be set via {@link #setHintBits(int)} and cleared via {@link #clearHintBits(int)}. * </p> * <p> * If set, {@link GLRegion#draw(GL2ES2, RegionRenderer) GLRegion's draw-method} @@ -73,10 +73,10 @@ public class RenderState { public static final int BITHINT_BLENDING_ENABLED = 1 << 0 ; /** - * Bitfield hint, {@link #isHintMaskSet(int) if set} + * Bitfield hint, {@link #hintBitsSet(int) if set} * stating globally <i>enabled</i> {@link GL#GL_DEPTH_TEST}, otherwise <i>disabled</i>. * <p> - * Shall be set via {@link #setHintMask(int)} and cleared via {@link #clearHintMask(int)}. + * Shall be set via {@link #setHintBits(int)} and cleared via {@link #clearHintBits(int)}. * </p> * <p> * {@link GLRegion#draw(GL2ES2, RegionRenderer) GLRegion's draw-method} @@ -105,7 +105,7 @@ public class RenderState { /** Optional clipping {@link Frustum}, which shall be pre-multiplied with the Mv-matrix. Null if unused. */ private final Frustum clipFrustum; private boolean useClipFrustum; - private int hintBitfield; + private int hintBits; private ShaderProgram sp; private static synchronized int getNextID() { @@ -209,7 +209,7 @@ public class RenderState { this.clipFrustum = new Frustum(); this.useClipFrustum = false; - this.hintBitfield = 0; + this.hintBits = 0; this.sp = null; } @@ -296,6 +296,17 @@ public class RenderState { /** Returns the optional Mv-premultiplied clipping {@link Frustum} or null if unused. */ public final Frustum getClipFrustum() { return useClipFrustum ? this.clipFrustum : null; } + public final int getHintBits() { return this.hintBits; } + public final boolean hintBitsSet(final int mask) { + return mask == ( hintBits & mask ); + } + public final void setHintBits(final int mask) { + hintBits |= mask; + } + public final void clearHintBits(final int mask) { + hintBits &= ~mask; + } + /** * * @param gl @@ -362,17 +373,6 @@ public class RenderState { } } - - public final boolean isHintMaskSet(final int mask) { - return mask == ( hintBitfield & mask ); - } - public final void setHintMask(final int mask) { - hintBitfield |= mask; - } - public final void clearHintMask(final int mask) { - hintBitfield &= ~mask; - } - /** * Only nullifies {@link ShaderProgram} reference owned by {@link RegionRenderer}. */ |