diff options
author | Sven Göthel <[email protected]> | 2024-02-13 22:19:05 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-13 22:19:05 +0100 |
commit | 101ec44f9d6df7faa0695accccfd43f51e48e7a4 (patch) | |
tree | 77a0b4dcc3fe74c91189fffe4c41a5c81e3ce2d7 /src/jogl/classes/com/jogamp/graph | |
parent | 65b3a230a53252f7c2cacd968b7afee6d43e7327 (diff) |
Bug 1501: Graph RenderState add debug-bits, i.e. DEBUG_LINESTRIP used in VBORegionSPES2 to just render lines instead of the filled area -> Used in UIShapeDemo02a
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java | 15 |
1 files changed, 15 insertions, 0 deletions
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 4913d8174..c6591d5c8 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java @@ -88,6 +88,8 @@ public class RenderState { */ public static final int BITHINT_GLOBAL_DEPTH_TEST_ENABLED = 1 << 1 ; + public static final int DEBUG_LINESTRIP = 1 << 0 ; + public static final RenderState getRenderState(final GL2ES2 gl) { return (RenderState) gl.getContext().getAttachedObject(thisKey); } @@ -106,6 +108,7 @@ public class RenderState { private final Frustum clipFrustum; private boolean useClipFrustum; private int hintBits; + private int debugBits; private ShaderProgram sp; private static synchronized int getNextID() { @@ -210,6 +213,7 @@ public class RenderState { this.useClipFrustum = false; this.hintBits = 0; + this.debugBits = 0; this.sp = null; } @@ -307,6 +311,17 @@ public class RenderState { hintBits &= ~mask; } + public final int getDebugBits() { return this.debugBits; } + public final boolean debugBitsSet(final int mask) { + return mask == ( debugBits & mask ); + } + public final void setDebugBits(final int mask) { + debugBits |= mask; + } + public final void clearDebugBits(final int mask) { + debugBits &= ~mask; + } + /** * * @param gl |