summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/common/nio/AbstractBuffer.java (renamed from src/java/com/jogamp/gluegen/runtime/AbstractBuffer.java)10
-rw-r--r--src/java/com/jogamp/common/nio/AbstractLongBuffer.java (renamed from src/java/com/jogamp/gluegen/runtime/AbstractLongBuffer.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Buffers.java (renamed from src/java/com/jogamp/gluegen/runtime/Buffers.java)3
-rw-r--r--src/java/com/jogamp/common/nio/Int64Buffer.java (renamed from src/java/com/jogamp/gluegen/runtime/Int64Buffer.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Int64BufferME_CDC_FP.java (renamed from src/java/com/jogamp/gluegen/runtime/Int64BufferME_CDC_FP.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Int64BufferSE.java (renamed from src/java/com/jogamp/gluegen/runtime/Int64BufferSE.java)2
-rw-r--r--src/java/com/jogamp/common/nio/NativeBuffer.java54
-rw-r--r--src/java/com/jogamp/common/nio/PointerBuffer.java (renamed from src/java/com/jogamp/gluegen/runtime/PointerBuffer.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/PointerBufferME_CDC_FP.java (renamed from src/java/com/jogamp/gluegen/runtime/PointerBufferME_CDC_FP.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/PointerBufferSE.java (renamed from src/java/com/jogamp/gluegen/runtime/PointerBufferSE.java)3
-rw-r--r--src/java/com/jogamp/common/nio/StructAccessor.java (renamed from src/java/com/jogamp/gluegen/runtime/StructAccessor.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/os/DynamicLinker.java (renamed from src/java/com/jogamp/gluegen/runtime/DynamicLinker.java)2
-rwxr-xr-xsrc/java/com/jogamp/common/os/DynamicLookupHelper.java (renamed from src/java/com/jogamp/gluegen/runtime/DynamicLookupHelper.java)2
-rwxr-xr-xsrc/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java (renamed from src/java/com/jogamp/gluegen/runtime/MacOSXDynamicLinkerImpl.java)6
-rwxr-xr-xsrc/java/com/jogamp/common/os/NativeLibrary.java (renamed from src/java/com/jogamp/gluegen/runtime/NativeLibrary.java)5
-rw-r--r--src/java/com/jogamp/common/os/Platform.java (renamed from src/java/com/jogamp/gluegen/runtime/Platform.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/os/UnixDynamicLinkerImpl.java (renamed from src/java/com/jogamp/gluegen/runtime/UnixDynamicLinkerImpl.java)6
-rwxr-xr-xsrc/java/com/jogamp/common/os/WindowsDynamicLinkerImpl.java (renamed from src/java/com/jogamp/gluegen/runtime/WindowsDynamicLinkerImpl.java)6
-rw-r--r--src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java1
-rw-r--r--src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java1
20 files changed, 92 insertions, 30 deletions
diff --git a/src/java/com/jogamp/gluegen/runtime/AbstractBuffer.java b/src/java/com/jogamp/common/nio/AbstractBuffer.java
index 34e39ba..d76574b 100644
--- a/src/java/com/jogamp/gluegen/runtime/AbstractBuffer.java
+++ b/src/java/com/jogamp/common/nio/AbstractBuffer.java
@@ -28,7 +28,9 @@
/*
* Created on Saturday, March 27 2010 11:55
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+
+import com.jogamp.common.os.*;
import java.nio.ByteBuffer;
import java.nio.Buffer;
@@ -38,7 +40,7 @@ import java.util.HashMap;
* @author Michael Bien
* @author Sven Gothel
*/
-public abstract class AbstractBuffer {
+public abstract class AbstractBuffer implements NativeBuffer {
protected final ByteBuffer bb;
protected int capacity;
@@ -67,7 +69,7 @@ public abstract class AbstractBuffer {
return position;
}
- public final AbstractBuffer position(int newPos) {
+ public final NativeBuffer position(int newPos) {
if (0 > newPos || newPos >= capacity) {
throw new IndexOutOfBoundsException("Sorry to interrupt, but the position "+newPos+" was out of bounds. " +
"My capacity is "+capacity()+".");
@@ -84,7 +86,7 @@ public abstract class AbstractBuffer {
return position < capacity;
}
- public final AbstractBuffer rewind() {
+ public final NativeBuffer rewind() {
position = 0;
return this;
}
diff --git a/src/java/com/jogamp/gluegen/runtime/AbstractLongBuffer.java b/src/java/com/jogamp/common/nio/AbstractLongBuffer.java
index 63c2b5f..ad90ffc 100644
--- a/src/java/com/jogamp/gluegen/runtime/AbstractLongBuffer.java
+++ b/src/java/com/jogamp/common/nio/AbstractLongBuffer.java
@@ -28,8 +28,9 @@
/*
* Created on Saturday, March 27 2010 11:55
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.*;
import java.nio.ByteBuffer;
import java.nio.Buffer;
import java.util.HashMap;
diff --git a/src/java/com/jogamp/gluegen/runtime/Buffers.java b/src/java/com/jogamp/common/nio/Buffers.java
index 49f6e8b..e3bea17 100755
--- a/src/java/com/jogamp/gluegen/runtime/Buffers.java
+++ b/src/java/com/jogamp/common/nio/Buffers.java
@@ -36,8 +36,9 @@
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java b/src/java/com/jogamp/common/nio/Int64Buffer.java
index 4535bdb..6f0b7a3 100644
--- a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
+++ b/src/java/com/jogamp/common/nio/Int64Buffer.java
@@ -25,8 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.*;
import java.nio.ByteBuffer;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64BufferME_CDC_FP.java b/src/java/com/jogamp/common/nio/Int64BufferME_CDC_FP.java
index 93863cf..9621677 100755
--- a/src/java/com/jogamp/gluegen/runtime/Int64BufferME_CDC_FP.java
+++ b/src/java/com/jogamp/common/nio/Int64BufferME_CDC_FP.java
@@ -33,8 +33,9 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64BufferSE.java b/src/java/com/jogamp/common/nio/Int64BufferSE.java
index a874133..fc262fd 100755
--- a/src/java/com/jogamp/gluegen/runtime/Int64BufferSE.java
+++ b/src/java/com/jogamp/common/nio/Int64BufferSE.java
@@ -33,7 +33,7 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
import java.nio.*;
diff --git a/src/java/com/jogamp/common/nio/NativeBuffer.java b/src/java/com/jogamp/common/nio/NativeBuffer.java
new file mode 100644
index 0000000..99a5cbc
--- /dev/null
+++ b/src/java/com/jogamp/common/nio/NativeBuffer.java
@@ -0,0 +1,54 @@
+/*
+ * Created on Tuesday, March 30 2010 18:22
+ */
+package com.jogamp.common.nio;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Hardware independent container for various kinds of buffers.
+ *
+ * @author Michael Bien
+ * @author Sven Gothel
+ */
+public interface NativeBuffer/*<B extends NativeBuffer>*/ {
+
+ public int limit();
+
+ public int capacity();
+
+ public int position();
+
+ public NativeBuffer position(int newPos);
+
+ public int remaining();
+
+ public boolean hasRemaining();
+
+ public NativeBuffer rewind();
+
+ public boolean hasArray();
+
+ public int arrayOffset();
+
+ public ByteBuffer getBuffer();
+
+ public boolean isDirect();
+
+/*
+ public long[] array();
+
+ public B rewind();
+
+ public B put(int index, long value);
+
+ public B put(long value);
+
+ public B put(B src);
+
+ public long get();
+
+ public long get(int idx);
+*/
+
+}
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java b/src/java/com/jogamp/common/nio/PointerBuffer.java
index cfc53a8..26d2e7b 100644
--- a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
+++ b/src/java/com/jogamp/common/nio/PointerBuffer.java
@@ -28,8 +28,9 @@
/*
* Created on Saturday, March 27 2010 11:55
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.*;
import java.nio.ByteBuffer;
import java.nio.Buffer;
import java.util.HashMap;
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBufferME_CDC_FP.java b/src/java/com/jogamp/common/nio/PointerBufferME_CDC_FP.java
index a660e1f..6e2c7d9 100755
--- a/src/java/com/jogamp/gluegen/runtime/PointerBufferME_CDC_FP.java
+++ b/src/java/com/jogamp/common/nio/PointerBufferME_CDC_FP.java
@@ -33,8 +33,9 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBufferSE.java b/src/java/com/jogamp/common/nio/PointerBufferSE.java
index 9943ec1..11dc629 100755
--- a/src/java/com/jogamp/gluegen/runtime/PointerBufferSE.java
+++ b/src/java/com/jogamp/common/nio/PointerBufferSE.java
@@ -33,8 +33,9 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/StructAccessor.java b/src/java/com/jogamp/common/nio/StructAccessor.java
index 6f3ad7d..117e8de 100644
--- a/src/java/com/jogamp/gluegen/runtime/StructAccessor.java
+++ b/src/java/com/jogamp/common/nio/StructAccessor.java
@@ -36,8 +36,9 @@
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/DynamicLinker.java b/src/java/com/jogamp/common/os/DynamicLinker.java
index f3cfcfd..ef5d5dc 100755
--- a/src/java/com/jogamp/gluegen/runtime/DynamicLinker.java
+++ b/src/java/com/jogamp/common/os/DynamicLinker.java
@@ -37,7 +37,7 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
/** Provides an abstract interface to the OS's low-level dynamic
linking functionality. */
diff --git a/src/java/com/jogamp/gluegen/runtime/DynamicLookupHelper.java b/src/java/com/jogamp/common/os/DynamicLookupHelper.java
index bc29732..a4f74a4 100755
--- a/src/java/com/jogamp/gluegen/runtime/DynamicLookupHelper.java
+++ b/src/java/com/jogamp/common/os/DynamicLookupHelper.java
@@ -37,7 +37,7 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
/** Interface callers may use to use the ProcAddressHelper's {@link
ProcAddressHelper#resetProcAddressTable resetProcAddressTable}
diff --git a/src/java/com/jogamp/gluegen/runtime/MacOSXDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java
index 8abbd4e..531bc5c 100755
--- a/src/java/com/jogamp/gluegen/runtime/MacOSXDynamicLinkerImpl.java
+++ b/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java
@@ -1,11 +1,9 @@
/* !---- DO NOT EDIT: This file autogenerated by com\sun\gluegen\JavaEmitter.java on Mon Jul 31 16:27:00 PDT 2006 ----! */
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
-import com.jogamp.gluegen.runtime.*;
-public class MacOSXDynamicLinkerImpl implements DynamicLinker
-{
+public class MacOSXDynamicLinkerImpl implements DynamicLinker {
public static final int RTLD_LAZY = 0x1;
public static final int RTLD_NOW = 0x2;
diff --git a/src/java/com/jogamp/gluegen/runtime/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java
index 7de75a3..2de8bc9 100755
--- a/src/java/com/jogamp/gluegen/runtime/NativeLibrary.java
+++ b/src/java/com/jogamp/common/os/NativeLibrary.java
@@ -37,8 +37,9 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
+import com.jogamp.gluegen.runtime.NativeLibLoader;
import java.io.*;
import java.lang.reflect.*;
import java.security.*;
@@ -412,7 +413,7 @@ public class NativeLibrary implements DynamicLookupHelper {
}
private static volatile boolean loadedDynLinkNativeLib;
- static void ensureNativeLibLoaded() {
+ public static void ensureNativeLibLoaded() {
if (!loadedDynLinkNativeLib) {
synchronized (NativeLibrary.class) {
if (!loadedDynLinkNativeLib) {
diff --git a/src/java/com/jogamp/gluegen/runtime/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index a621279..169af13 100644
--- a/src/java/com/jogamp/gluegen/runtime/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -28,8 +28,9 @@
/*
* Created on Sunday, March 28 2010 14:43
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
+import com.jogamp.common.nio.Buffers;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
diff --git a/src/java/com/jogamp/gluegen/runtime/UnixDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/UnixDynamicLinkerImpl.java
index 018f31b..02bc828 100755
--- a/src/java/com/jogamp/gluegen/runtime/UnixDynamicLinkerImpl.java
+++ b/src/java/com/jogamp/common/os/UnixDynamicLinkerImpl.java
@@ -1,11 +1,9 @@
/* !---- DO NOT EDIT: This file autogenerated by com\sun\gluegen\JavaEmitter.java on Mon Jul 31 16:26:59 PDT 2006 ----! */
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
-import com.jogamp.gluegen.runtime.*;
-public class UnixDynamicLinkerImpl implements DynamicLinker
-{
+public class UnixDynamicLinkerImpl implements DynamicLinker {
public static final int RTLD_LAZY = 0x00001;
public static final int RTLD_NOW = 0x00002;
diff --git a/src/java/com/jogamp/gluegen/runtime/WindowsDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/WindowsDynamicLinkerImpl.java
index 87b9a37..f5a3312 100755
--- a/src/java/com/jogamp/gluegen/runtime/WindowsDynamicLinkerImpl.java
+++ b/src/java/com/jogamp/common/os/WindowsDynamicLinkerImpl.java
@@ -1,11 +1,9 @@
/* !---- DO NOT EDIT: This file autogenerated by com\sun\gluegen\JavaEmitter.java on Tue May 27 02:37:55 PDT 2008 ----! */
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
-import com.jogamp.gluegen.runtime.*;
-public class WindowsDynamicLinkerImpl implements DynamicLinker
-{
+public class WindowsDynamicLinkerImpl implements DynamicLinker {
/** Interface to C language function: <br> <code> BOOL FreeLibrary(HANDLE hLibModule); </code> */
diff --git a/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java b/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java
index 1b7f9d6..787eab5 100644
--- a/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java
+++ b/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java
@@ -39,6 +39,7 @@
package com.jogamp.gluegen.runtime;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.security.*;
// Debugging only
diff --git a/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java b/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java
index 7470c46..2031d9e 100644
--- a/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java
+++ b/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java
@@ -36,6 +36,7 @@
package com.jogamp.gluegen.runtime.opengl;
+import com.jogamp.common.os.DynamicLookupHelper;
import com.jogamp.gluegen.runtime.*;
// Debugging only