summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java2
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java3
-rw-r--r--src/newt/classes/jogamp/newt/ScreenImpl.java3
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java3
4 files changed, 10 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 82f74e370..61dbfb34c 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -63,8 +63,8 @@ public class NewtFactory {
try {
clazz = Class.forName(clazzName);
} catch (Throwable t) {
- System.err.println("Warning: Failed to find class <"+clazzName+">: "+t.getMessage());
if(DEBUG_IMPLEMENTATION) {
+ System.err.println("Warning: Failed to find class <"+clazzName+">: "+t.getMessage());
t.printStackTrace();
}
}
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index f2f35135a..a0bbcc264 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -70,6 +70,9 @@ public abstract class DisplayImpl extends Display {
throw new RuntimeException("Unknown display type \"" + type + "\"");
}
}
+ if(null==displayClass) {
+ throw new ClassNotFoundException("Failed to find NEWT Display Class <"+type+".Display>");
+ }
return displayClass;
}
diff --git a/src import java.nio.ByteOrder; import static com.mbien.opencl.CLException.*; import static com.mbien.opencl.CL.*; /** * High level abstraction for an OpenCL Kernel. * "A kernel is a function declared in a program. A kernel is identified by the __kernel qualifier * applied to any function in a program. A kernel object encapsulates the specific __kernel * function declared in a program and the argument values to be used when executing this * __kernel function." * @author Michael Bien */ public class CLKernel implements CLResource { public final long ID; public final String name; public final int numArgs; private final CLProgram program; private final CL cl; private int argIndex; CLKernel(CLProgram program, long id) { this.ID = id; this.program = program; this.cl = program.context.cl; long[] longArray
an>1]; // get function name int ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, 0, null, longArray, 0); checkForError(ret, "error while asking for kernel function name"); ByteBuffer bb = ByteBuffer.allocate((int)longArray[0]).order(ByteOrder.nativeOrder()); ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, bb.capacity(), bb, null, 0); checkForError(ret, "error while asking for kernel function name"); this.name = CLUtils.clString2JavaString(bb.array(), bb.capacity()); // get number of arguments ret = cl.clGetKernelInfo(ID, CL_KERNEL_NUM_ARGS, 0, null, longArray, 0); checkForError(ret, "error while asking for number of function arguments."); numArgs = (int)longArray[0]; } public CLKernel putArg(CLBuffer<?> value) { setArg(argIndex++, value); return this; } public CLKernel putArg(int value) { setArg(argIndex++, value); return this; } public CLKernel putArg(long value) { setArg(argIndex++, value); return this; } public CLKernel putArg(float value) { setArg(argIndex++, value); return this; } public CLKernel putArg(double value) { setArg(argIndex++, value); return this; } public CLKernel putArgs(CLBuffer<?>... values) { setArgs(argIndex, values); argIndex += values.length; return this; } public CLKernel setArg(int argumentIndex, CLBuffer<?> value) { setArgument(argumentIndex, CPU.is32Bit()?4:8, wrap(value.ID)); return this; } public CLKernel setArg(int argumentIndex, int value) { setArgument(argumentIndex, 4, wrap(value)); return this; } public CLKernel setArg(int argumentIndex, long value) { setArgument(argumentIndex, 8, wrap(value)); return this; } public CLKernel setArg(int argumentIndex, float value) {