From 101ec44f9d6df7faa0695accccfd43f51e48e7a4 Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Tue, 13 Feb 2024 22:19:05 +0100 Subject: 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 --- .../com/jogamp/graph/curve/opengl/RenderState.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/jogl/classes/com/jogamp/graph') 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 -- cgit v1.2.3