From 676ff4b8209abe31c80d5292566b2b04aa7279d6 Mon Sep 17 00:00:00 2001 From: Julien Gouesse Date: Thu, 11 Apr 2013 22:26:55 +0200 Subject: Fixes a regression in JoglClipStateUtil --- .../src/main/java/com/ardor3d/scene/state/jogl/JoglClipStateUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglClipStateUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglClipStateUtil.java index 33795a6..dfd3c9c 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglClipStateUtil.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglClipStateUtil.java @@ -68,12 +68,13 @@ public abstract class JoglClipStateUtil { for (final double planeEqCoeff : state.getPlaneEquations(planeIndex)) { ((FloatBuffer) record.buf).put((float) planeEqCoeff); } + record.buf.flip(); gl.getGLES1().glClipPlanef(GL2ES1.GL_CLIP_PLANE0 + planeIndex, (FloatBuffer) record.buf); } else { ((DoubleBuffer) record.buf).put(state.getPlaneEquations(planeIndex)); + record.buf.flip(); gl.getGL2().glClipPlane(GL2ES1.GL_CLIP_PLANE0 + planeIndex, (DoubleBuffer) record.buf); } - record.buf.flip(); } else { // TODO use this suggestion but take into account the good reference frame: // http://stackoverflow.com/a/13705204 -- cgit v1.2.3