summaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-30 03:39:16 +0200
committerSven Gothel <[email protected]>2010-03-30 03:39:16 +0200
commit84e5ba7a4821469f43c0f4bbeaa8e383b203d050 (patch)
tree012162d83b2fecf503a89c973609a73b2c1a4a83 /src/native
parentdadccfbd5641e08c4201ef58145f40d71b0ea76d (diff)
http://www.jogamp.org/bugzilla/show_bug.cgi?id=392
32bit/64bit values and arrays are misrepresented - PointerBuffer: Adding methods PointeRBuffer referenceBuffer(int index, Buffer data) PointeRBuffer referenceBuffer(Buffer data) Buffer getReferencedBuffer(int index) Buffer getReferencedBuffer() Adding a reference of a given direct Buffer to this pointer buffer, and retrieving a previously referenced direct Buffer. This allows a more convenient handling of PointerBuffer with the user API's ..
Diffstat (limited to 'src/native')
-rw-r--r--src/native/common/Platform.c (renamed from src/native/common/CPU.c)0
-rw-r--r--src/native/common/PointerBuffer.c10
2 files changed, 10 insertions, 0 deletions
diff --git a/src/native/common/CPU.c b/src/native/common/Platform.c
index 0cc7adc..0cc7adc 100644
--- a/src/native/common/CPU.c
+++ b/src/native/common/Platform.c
diff --git a/src/native/common/PointerBuffer.c b/src/native/common/PointerBuffer.c
new file mode 100644
index 0000000..9736edc
--- /dev/null
+++ b/src/native/common/PointerBuffer.c
@@ -0,0 +1,10 @@
+
+#include <jni.h>
+
+#include <assert.h>
+
+JNIEXPORT jlong JNICALL
+Java_com_jogamp_gluegen_runtime_PointerBuffer_getDirectBufferAddressImpl(JNIEnv *env, jclass _unused, jobject directBuffer) {
+ return ( NULL != directBuffer ) ? ( jlong) (*env)->GetDirectBufferAddress(env, directBuffer) : 0L ;
+}
+