From 467453f0752f162ce297de0db27d6a4fef67d15f Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sun, 27 Jun 2010 23:44:56 +0200 Subject: minor refactorings and updates. --- src/com/jogamp/opencl/CLKernel.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/com/jogamp/opencl/CLKernel.java') diff --git a/src/com/jogamp/opencl/CLKernel.java b/src/com/jogamp/opencl/CLKernel.java index 8fa000dc..785fbc78 100644 --- a/src/com/jogamp/opencl/CLKernel.java +++ b/src/com/jogamp/opencl/CLKernel.java @@ -5,7 +5,6 @@ import com.jogamp.common.nio.Buffers; import com.jogamp.common.nio.PointerBuffer; import java.nio.Buffer; import java.nio.ByteBuffer; -import java.nio.ByteOrder; import static com.jogamp.opencl.CLException.*; import static com.jogamp.opencl.CL.*; @@ -45,7 +44,7 @@ public class CLKernel extends CLObject implements CLResource, Cloneable { int ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, 0, null, size); checkForError(ret, "error while asking for kernel function name"); - ByteBuffer bb = ByteBuffer.allocateDirect((int)size.get(0)).order(ByteOrder.nativeOrder()); + ByteBuffer bb = Buffers.newDirectByteBuffer((int)size.get(0)); ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, bb.capacity(), bb, null); checkForError(ret, "error while asking for kernel function name"); -- cgit v1.2.3