aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-13 22:17:06 +0100
committerSven Göthel <[email protected]>2024-02-13 22:17:06 +0100
commit65b3a230a53252f7c2cacd968b7afee6d43e7327 (patch)
treee4c75afce67f151fbb2dc8d3fa4854b741f44e11 /src/jogl/classes/jogamp
parente6dd773b249cbeb117a710a46133fa42f748f1d7 (diff)
Graph RenderState/RegionRenderer: Rename isHintMaskSet()->hintBitsSet(), setHintMask()->setHintBits(), clearHintMask()->clearHintBits()
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java4
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java3
3 files changed, 8 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
index 4644ff883..8f0d0de73 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
@@ -379,7 +379,7 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
private void renderFBO(final GL2ES2 gl, final RenderState rs, final int width, final int height) {
gl.glViewport(0, 0, width, height);
- if( rs.isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED | RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) {
+ if( rs.hintBitsSet(RenderState.BITHINT_BLENDING_ENABLED | RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) {
// BITHINT_GLOBAL_DEPTH_TEST_ENABLED path added by commit 45395696c252c215a8a22d05e5da7e98c662d07e (2014-04-10),
// but not in VBORegion2PVBAA.renderVBO(..) -> investigate if required for working MSAA:
// - "VBORegion2PMSAAES2 enables/disables GL_DEPTH_TEST, otherwise MSAA is corrupt"
@@ -388,7 +388,7 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
gl.glEnable(GL.GL_DEPTH_TEST);
- } else if( rs.isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
+ } else if( rs.hintBitsSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
// RGB is already multiplied w/ alpha via renderRegion2FBO(..)
gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
}
@@ -424,7 +424,7 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
if( 0 >= targetFboWidth || 0 >= targetFboHeight ) {
throw new IllegalArgumentException("targetFBOSize "+targetFboWidth+"x"+targetFboHeight+" must be greater than 0");
}
- final boolean blendingEnabled = rs.isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED);
+ final boolean blendingEnabled = rs.hintBitsSet(RenderState.BITHINT_BLENDING_ENABLED);
final int targetFboSamples = rs.getSampleCount() > 1 ? rs.getSampleCount() : 0;
final boolean fboSampleTypeMatch;
{
@@ -490,7 +490,7 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
// Multiply RGB w/ Alpha, preserve alpha for renderFBO(..)
gl.glBlendFuncSeparate(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
- if( rs.isHintMaskSet(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) {
+ if( rs.hintBitsSet(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED) ) {
gl.glDisable(GL.GL_DEPTH_TEST);
}
} else {
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index 333150899..c03e4d50d 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -426,7 +426,7 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
// but not here -> investigate if required for working MSAA:
// - "VBORegion2PMSAAES2 enables/disables GL_DEPTH_TEST, otherwise MSAA is corrupt"
//
- if( rs.isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
+ if( rs.hintBitsSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
// RGB is already multiplied w/ alpha via renderRegion2FBO(..)
gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
}
@@ -463,7 +463,7 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
if( 0 >= targetFboWidth || 0 >= targetFboHeight ) {
throw new IllegalArgumentException("targetFBOSize "+targetFboWidth+"x"+targetFboHeight+" must be greater than 0");
}
- final boolean blendingEnabled = rs.isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED);
+ final boolean blendingEnabled = rs.hintBitsSet(RenderState.BITHINT_BLENDING_ENABLED);
if(null == fbo) {
fboWidth = targetFboWidth;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
index 478931531..7fcd61292 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -187,7 +187,8 @@ public final class VBORegionSPES2 extends GLRegion {
vpc_ileave.enableBuffer(gl, true);
indicesBuffer.bindBuffer(gl, true); // keeps VBO binding
- if( renderer.getRenderState().isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
+ final RenderState rs = renderer.getRenderState();
+ if( rs.hintBitsSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
}