diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
3 files changed, 6 insertions, 11 deletions
diff --git a/src/jogl/classes/jogamp/opengl/ProjectFloat.java b/src/jogl/classes/jogamp/opengl/ProjectFloat.java index d4fd1c935..80c142429 100644 --- a/src/jogl/classes/jogamp/opengl/ProjectFloat.java +++ b/src/jogl/classes/jogamp/opengl/ProjectFloat.java @@ -123,6 +123,7 @@ import javax.media.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.common.nio.Buffers; import com.jogamp.opengl.math.FloatUtil; +import com.jogamp.opengl.math.VectorUtil; /** * ProjectFloat.java @@ -407,14 +408,14 @@ public class ProjectFloat { up[1] = upy; up[2] = upz; - FloatUtil.normalize(forward); + VectorUtil.normalize(forward); /* Side = forward x up */ - FloatUtil.cross(forward, up, side); - FloatUtil.normalize(side); + VectorUtil.cross(side, forward, up); + VectorUtil.normalize(side); /* Recompute up as: up = side x forward */ - FloatUtil.cross(side, forward, up); + VectorUtil.cross(up, side, forward); FloatUtil.makeIdentityf(matrixBuf); final int mPos = matrixBuf.position(); diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLTextureRaster.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLTextureRaster.java index dba408554..09da8c9ee 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLTextureRaster.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLTextureRaster.java @@ -147,10 +147,7 @@ public class GLSLTextureRaster { if(null != pmvMatrixUniform) { pmvMatrixUniform = null; } - if(null != pmvMatrix) { - pmvMatrix.destroy(); - pmvMatrix=null; - } + pmvMatrix=null; if(null != interleavedVBO) { interleavedVBO.destroy(gl); interleavedVBO=null; diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java index 458a9c94f..ff8006cf8 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java @@ -101,9 +101,6 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun public void destroy() { fixedFunction.destroy(gl); fixedFunction = null; - if(ownsPMVMatrix) { - pmvMatrix.destroy(); - } pmvMatrix=null; gl=null; } |