LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: sideshowbob on April 15, 2015, 23:00:30

Title: Applet Loader "could not locate OpenCL" (pre signed jars)
Post by: sideshowbob on April 15, 2015, 23:00:30
Hi there

I am running my own applet inside of LWJGL_Applet 2.9.3 Applet Loader.  I am please to say my applet (which already contains other functionality) works alright.  So I added the OpenCL sum example code (http://wiki.lwjgl.org/wiki/Sum_Example).

Alas at runtime, an exception is thrown on CL.create():

org.lwjgl.LWJGLException: Could not locate OpenCL library.


The obvious:

<param name="al_windows" value="windows_natives.jar">

Having checked the obvious, I'm stumped - can anybody help please?
Title: Re: Applet Loader "could not locate OpenCL" (pre signed jars)
Post by: abcdef on April 16, 2015, 09:31:56
have you got opencl drivers installed on your system for your GPU? I believe you still need the OS drivers for this to work, the natives in LWJGL just bind the OS level libraries.
Title: Re: Applet Loader "could not locate OpenCL" (pre signed jars)
Post by: sideshowbob on May 01, 2015, 17:37:01
Ok, so my original hardware didn't support OpenCL, so I tried on a different machine with new drivers.  Now I get a nullpointerexception from platform.getDevices()

CL.create();
CLPlatform platform = CLPlatform.getPlatforms().get(0);
List<CLDevice> devices = platform.getDevices(CL_DEVICE_TYPE_GPU);
CLContext context = CLContext.create(platform, devices, null, null, null);

java.lang.NullPointerException
at org.lwjgl.opencl.InfoUtilFactory$CLContextUtil.create(InfoUtilFactory.java:102)
at org.lwjgl.opencl.CLContext.create(CLContext.java:173)


Alas I'm no longer at the computer I was able to try this on!  Is this likely to mean the other computer had no suitable device either?