diff --git a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java index 8bb62c98..0cb9bec0 100644 --- a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java +++ b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java @@ -201,8 +201,13 @@ public class VolumeRender extends JOGLGraphicRender { e.printStackTrace(); } } else if (program.getProgramId() == null) { - //this.bindingTextures(); - program.init(gl); + this.bindingTextures(); + /*try { + compileShaders(); + } catch (Exception e) { + e.printStackTrace(); + }*/ + //program.init(gl); } } @@ -258,12 +263,10 @@ public class VolumeRender extends JOGLGraphicRender { @Override public void draw() { try { - //this.bindingTextures(); - //this.compileShaders(); + //gl.glEnable(GL_TEXTURE_2D); + //gl.glEnable(GL_TEXTURE_3D); program.use(gl); setUniforms(); - //program.use(gl); - //program.setUniforms(gl); IntBuffer intBuffer = IntBuffer.allocate(1); gl.glGenBuffers(1, intBuffer); @@ -291,6 +294,8 @@ public class VolumeRender extends JOGLGraphicRender { //Program.destroyAllPrograms(gl); gl.glUseProgram(0); gl.glEnable(GL_DEPTH_TEST); + //gl.glDisable(GL_TEXTURE_2D); + //gl.glDisable(GL_TEXTURE_3D); } catch (Exception e) { e.printStackTrace(); } diff --git a/meteoinfo-lab/milconfig.xml b/meteoinfo-lab/milconfig.xml index 77dcaec8..594bd757 100644 --- a/meteoinfo-lab/milconfig.xml +++ b/meteoinfo-lab/milconfig.xml @@ -1,10 +1,6 @@ - - - - - + @@ -13,20 +9,24 @@ - + + + + + - - - + + + - - - + + + diff --git a/meteoinfo-ndarray/src/main/java/org/meteoinfo/ndarray/math/ArrayMath.java b/meteoinfo-ndarray/src/main/java/org/meteoinfo/ndarray/math/ArrayMath.java index 445e10de..c203b7cd 100644 --- a/meteoinfo-ndarray/src/main/java/org/meteoinfo/ndarray/math/ArrayMath.java +++ b/meteoinfo-ndarray/src/main/java/org/meteoinfo/ndarray/math/ArrayMath.java @@ -275,7 +275,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.addInt(a, b); case FLOAT: @@ -303,7 +305,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.addInt(a, b.intValue()); case FLOAT: @@ -664,7 +668,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.subInt(a, b); case FLOAT: @@ -692,7 +698,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.subInt(a, b.intValue()); case FLOAT: @@ -731,7 +739,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.subInt(b.intValue(), a); case FLOAT: @@ -1165,7 +1175,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.mulInt(a, b); case FLOAT: @@ -1190,7 +1202,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.mulInt(a, b.intValue()); case FLOAT: @@ -1602,7 +1616,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.divInt(a, b); case FLOAT: @@ -1627,7 +1643,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.divInt(a, b.intValue()); case FLOAT: @@ -1663,7 +1681,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.divInt(b.intValue(), a); case FLOAT: @@ -2158,7 +2178,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.modInt(a, b); case FLOAT: @@ -2181,7 +2203,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.modInt(a, b.intValue()); case FLOAT: @@ -2204,7 +2228,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.modInt(b.intValue(), a); case FLOAT: @@ -2556,7 +2582,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.floorDivInt(a, b); case FLOAT: @@ -2579,7 +2607,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.floorDivInt(a, b.intValue()); case FLOAT: @@ -2602,7 +2632,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.floorDivInt(b.intValue(), a); case FLOAT: @@ -2940,7 +2972,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.powInt(a, b.intValue()); case FLOAT: @@ -2975,7 +3009,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(b.getDataType(), bType); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: case BOOLEAN: return ArrayMath.powInt(a.intValue(), b); case FLOAT: @@ -3009,7 +3045,9 @@ public class ArrayMath { DataType type = ArrayMath.commonType(a.getDataType(), b.getDataType()); switch (type) { case SHORT: + case USHORT: case INT: + case UINT: return ArrayMath.powInt(a, b); case FLOAT: case DOUBLE: