summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLContext.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-06-27 23:44:56 +0200
committerMichael Bien <[email protected]>2010-06-27 23:44:56 +0200
commit467453f0752f162ce297de0db27d6a4fef67d15f (patch)
tree005e02f82b122dcfa3c54f7ccf5db0992e49422d /src/com/jogamp/opencl/CLContext.java
parentbe5f1d62838cd8709a1f4f881c08494246a8471f (diff)
minor refactorings and updates.
Diffstat (limited to 'src/com/jogamp/opencl/CLContext.java')
-rw-r--r--src/com/jogamp/opencl/CLContext.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java
index 5deaf4cf..34e23786 100644
--- a/src/com/jogamp/opencl/CLContext.java
+++ b/src/com/jogamp/opencl/CLContext.java
@@ -1,5 +1,6 @@
package com.jogamp.opencl;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.opencl.CLDevice.Type;
import com.jogamp.opencl.CLSampler.AddressingMode;
import com.jogamp.opencl.CLSampler.FilteringMode;
@@ -11,7 +12,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.Buffer;
import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
@@ -78,7 +78,7 @@ public class CLContext extends CLObject implements CLResource {
int ret = cl.clGetContextInfo(ID, CL.CL_CONTEXT_DEVICES, 0, null, deviceCount);
checkForError(ret, "can not enumerate devices");
- ByteBuffer deviceIDs = ByteBuffer.allocateDirect((int)deviceCount.get()).order(ByteOrder.nativeOrder());
+ ByteBuffer deviceIDs = Buffers.newDirectByteBuffer((int)deviceCount.get());
ret = cl.clGetContextInfo(ID, CL.CL_CONTEXT_DEVICES, deviceIDs.capacity(), deviceIDs, null);
checkForError(ret, "can not enumerate devices");