aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java2
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java3
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp2
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp2
4 files changed, 7 insertions, 2 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 06c10586c..c43dc7913 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -303,7 +303,9 @@ public final class RegionRenderer {
public final void setColorStatic(final float r, final float g, final float b, final float a){ rs.setColorStatic(r, g, b, a); }
+ /** Set the optional clipping {@link AABBox}, which shall be pre-multiplied with the Mv-matrix or null to disable. */
public final void setClipBBox(final AABBox clipBBox) { rs.setClipBBox(clipBBox); }
+ /** Returns the optional Mv-premultiplied clipping {@link AABBox} or null if unused. */
public final AABBox getClipBBox() { return rs.getClipBBox(); }
public final boolean isHintMaskSet(final int mask) { return rs.isHintMaskSet(mask); }
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 32483c1fc..ed4bc2585 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
@@ -98,6 +98,7 @@ public class RenderState {
private final FloatBuffer weightBuffer;
private final float[] colorStatic;
private final FloatBuffer colorStaticBuffer;
+ /** Optional clipping {@link AABBox}, which shall be pre-multiplied with the Mv-matrix. Null if unused. */
private AABBox clipBBox;
private int hintBitfield;
private ShaderProgram sp;
@@ -262,7 +263,9 @@ public class RenderState {
colorStatic[3] = a;
}
+ /** Set the optional clipping {@link AABBox}, which shall be pre-multiplied with the Mv-matrix or null to disable. */
public final void setClipBBox(final AABBox clipBBox) { this.clipBBox = clipBBox; }
+ /** Returns the optional Mv-premultiplied clipping {@link AABBox} or null if unused. */
public final AABBox getClipBBox() { return this.clipBBox; }
/**
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp
index 6956529f7..b9974b97d 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp
@@ -24,7 +24,7 @@ void main(void)
}
#endif
#ifdef USE_AABBOX_CLIPPING
- gcv_ClipBBoxCoord = gca_Vertices.xyz;
+ gcv_ClipBBoxCoord = (gcu_PMVMatrix02[1] * gca_Vertices).xyz; // Mv
#endif
#ifdef USE_COLOR_TEXTURE
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp
index aebf8c147..9518834b0 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp
@@ -24,7 +24,7 @@ void main(void)
}
#endif
#ifdef USE_AABBOX_CLIPPING
- gcv_ClipBBoxCoord = gca_Vertices.xyz;
+ gcv_ClipBBoxCoord = (gcu_PMVMatrix01[1] * gca_Vertices).xyz; // Mv
#endif
#ifdef USE_COLOR_TEXTURE