summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv7-cross.sh5
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv7.sh1
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Buffers.java25
3 files changed, 29 insertions, 2 deletions
diff --git a/make/scripts/make.gluegen.all.linux-armv7-cross.sh b/make/scripts/make.gluegen.all.linux-armv7-cross.sh
index 152c247..a9892e1 100755
--- a/make/scripts/make.gluegen.all.linux-armv7-cross.sh
+++ b/make/scripts/make.gluegen.all.linux-armv7-cross.sh
@@ -6,6 +6,7 @@ if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
. $SDIR/setenv-build-jogl-x86_64.sh
fi
+# arm-linux-gnueabi == armel triplet
PATH=`pwd`/lib/linux/arm-linux-gnueabi/bin:$PATH
export PATH
@@ -27,8 +28,8 @@ export TARGET_IP=panda01
export TARGET_ROOT=/home/jogamp/projects-cross
export TARGET_ANT_HOME=/usr/share/ant
-export TARGET_PLATFORM_LIBS=/opt-linux-armv7-eabi/lib
-export TARGET_JAVA_LIBS=/opt-linux-armv7-eabi/jre/lib/arm
+export TARGET_PLATFORM_LIBS=/opt-linux-armv7-armel/usr/lib
+export TARGET_JAVA_LIBS=/opt-linux-armv7-armel/jre/lib/arm
export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv7.xml"
diff --git a/make/scripts/make.gluegen.all.linux-armv7.sh b/make/scripts/make.gluegen.all.linux-armv7.sh
index ecc2d77..ee7cbea 100755
--- a/make/scripts/make.gluegen.all.linux-armv7.sh
+++ b/make/scripts/make.gluegen.all.linux-armv7.sh
@@ -7,6 +7,7 @@
# -DisLinuxX86=true \
# -DisX11=true \
+# arm-linux-gnueabi == armel triplet
export TARGET_PLATFORM_LIBS=/usr/lib/arm-linux-gnueabi
export TARGET_JAVA_LIBS=/usr/lib/jvm/default-java/jre/lib/arm
diff --git a/src/java/com/jogamp/common/nio/Buffers.java b/src/java/com/jogamp/common/nio/Buffers.java
index c1bcffd..27000fe 100755
--- a/src/java/com/jogamp/common/nio/Buffers.java
+++ b/src/java/com/jogamp/common/nio/Buffers.java
@@ -632,6 +632,14 @@ public class Buffers {
return (B) ((ShortBuffer) dest).put((short) v);
} else if (dest instanceof IntBuffer) {
return (B) ((IntBuffer) dest).put((int) v);
+ } else if (dest instanceof FloatBuffer) {
+ return (B) ((FloatBuffer) dest).put((float) v);
+ } else if (dest instanceof LongBuffer) {
+ return (B) ((LongBuffer) dest).put((long) v);
+ } else if (dest instanceof DoubleBuffer) {
+ return (B) ((DoubleBuffer) dest).put((double) v);
+ } else if (dest instanceof CharBuffer) {
+ return (B) ((CharBuffer) dest).put((char) v);
} else {
throw new IllegalArgumentException("Byte doesn't match Buffer Class: " + dest);
}
@@ -643,6 +651,12 @@ public class Buffers {
return (B) ((ShortBuffer) dest).put(v);
} else if (dest instanceof IntBuffer) {
return (B) ((IntBuffer) dest).put((int) v);
+ } else if (dest instanceof FloatBuffer) {
+ return (B) ((FloatBuffer) dest).put((float) v);
+ } else if (dest instanceof LongBuffer) {
+ return (B) ((LongBuffer) dest).put((long) v);
+ } else if (dest instanceof DoubleBuffer) {
+ return (B) ((DoubleBuffer) dest).put((double) v);
} else {
throw new IllegalArgumentException("Short doesn't match Buffer Class: " + dest);
}
@@ -652,14 +666,23 @@ public class Buffers {
public static <B extends Buffer> B puti(B dest, int v) {
if (dest instanceof IntBuffer) {
return (B) ((IntBuffer) dest).put(v);
+ } else if (dest instanceof FloatBuffer) {
+ return (B) ((FloatBuffer) dest).put((float) v);
+ } else if (dest instanceof LongBuffer) {
+ return (B) ((LongBuffer) dest).put((long) v);
+ } else if (dest instanceof DoubleBuffer) {
+ return (B) ((DoubleBuffer) dest).put((double) v);
} else {
throw new IllegalArgumentException("Integer doesn't match Buffer Class: " + dest);
}
}
+ @SuppressWarnings("unchecked")
public static <B extends Buffer> B putf(B dest, float v) {
if (dest instanceof FloatBuffer) {
return (B) ((FloatBuffer) dest).put(v);
+ } else if (dest instanceof DoubleBuffer) {
+ return (B) ((DoubleBuffer) dest).put((double) v);
/* TODO FixedPoint required
} else if (dest instanceof IntBuffer) {
return (B) ((IntBuffer) dest).put(FixedPoint.toFixed(v));
@@ -668,6 +691,8 @@ public class Buffers {
throw new IllegalArgumentException("Float doesn't match Buffer Class: " + dest);
}
}
+
+ @SuppressWarnings("unchecked")
public static <B extends Buffer> B putd(B dest, double v) {
if (dest instanceof FloatBuffer) {
return (B) ((FloatBuffer) dest).put((float) v);