aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-01 18:57:41 +0200
committerSven Gothel <[email protected]>2023-08-01 18:57:41 +0200
commitde4767e90f752cb9804403fa4ac775394bb45324 (patch)
tree34c9f5cc1da976e36fe946e5aa6e05113474699f /src/jogl
parent285459363469e60df9db51a4c0485ec21d4e04ae (diff)
Graph Add {GLRegion, GraphShape}.setTextureUnit(int): Allowing to set texture unit after ctor
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java3
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java5
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java5
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java5
4 files changed, 18 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
index 2864f48bb..c282a4b92 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
@@ -356,6 +356,9 @@ public abstract class GLRegion extends Region {
}
}
+ /** Set the 2nd pass texture unit. */
+ public abstract void setTextureUnit(final int pass2TexUnit);
+
@Override
protected final void pushVertex(final Vec3f coords, final Vec3f texParams, final Vec4f rgba) {
// NIO array[3] is much slows than group/single
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
index 62451ec50..e5221eefb 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
@@ -127,6 +127,11 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
}
@Override
+ public void setTextureUnit(final int pass2TexUnit) {
+ gcu_FboTexUnit.setData(pass2TexUnit);
+ }
+
+ @Override
protected final void clearImpl(final GL2ES2 gl) {
fboDirty = true;
}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index 3acbd6c73..f7ab0a2d6 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -220,6 +220,11 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
}
@Override
+ public void setTextureUnit(final int pass2TexUnit) {
+ gcu_FboTexUnit.setData(pass2TexUnit);
+ }
+
+ @Override
protected final void clearImpl(final GL2ES2 gl) {
fboDirty = true;
}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
index a55bd626a..9d9e2bbea 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -75,6 +75,11 @@ public final class VBORegionSPES2 extends GLRegion {
}
@Override
+ public void setTextureUnit(final int pass2TexUnit) {
+ // nop
+ }
+
+ @Override
protected final void clearImpl(final GL2ES2 gl) { }
@Override