@SuppressWarnings("unchecked")
    protected void initOpenCL(final long window) {
        logger.info("Initialize OpenCL with LWJGL3");
        
//        try {
//            CL.create();
//        } catch (Exception ex) {
//            logger.log(Level.SEVERE, "Unable to initialize OpenCL", ex);
//            return;
//        }
        
        // load platforms and devices
        StringBuilder platformInfos = new StringBuilder();
        List<LwjglPlatform> platforms = new ArrayList<>();
        for (long platformId : getPlatforms()) {
            platforms.add(new LwjglPlatform(platformId));
        }

        platformInfos.append("Available OpenCL platforms:");

        for (int i = 0; i < platforms.size(); ++i) {
            LwjglPlatform platform = platforms.get(i);
            platformInfos.append("\n * Platform ").append(i + 1);
            platformInfos.append("\n *   Name: ").append(platform.getName());
            platformInfos.append("\n *   Vendor: ").append(platform.getVendor());
            platformInfos.append("\n *   Version: ").append(platform.getVersion());
            platformInfos.append("\n *   Profile: ").append(platform.getProfile());
            platformInfos.append("\n *   Supports interop: ").append(platform.hasOpenGLInterop());
            List<LwjglDevice> devices = platform.getDevices();
            platformInfos.append("\n *   Available devices:");
            for (int j=0; j<devices.size(); ++j) {
                LwjglDevice device = devices.get(j);
                platformInfos.append("\n *    * Device ").append(j + 1);
                platformInfos.append("\n *    *   Name: ").append(device.getName());
                platformInfos.append("\n *    *   Vendor: ").append(device.getVendor());
                platformInfos.append("\n *    *   Version: ").append(device.getVersion());
                platformInfos.append("\n *    *   Profile: ").append(device.getProfile());
                platformInfos.append("\n *    *   Compiler version: ").append(device.getCompilerVersion());
                platformInfos.append("\n *    *   Device type: ").append(device.getDeviceType());
                platformInfos.append("\n *    *   Compute units: ").append(device.getComputeUnits());
                platformInfos.append("\n *    *   Work group size: ").append(device.getMaxiumWorkItemsPerGroup());
                platformInfos.append("\n *    *   Global memory: ").append(device.getGlobalMemorySize()).append("B");
                platformInfos.append("\n *    *   Local memory: ").append(device.getLocalMemorySize()).append("B");
                platformInfos.append("\n *    *   Constant memory: ").append(device.getMaximumConstantBufferSize()).append("B");
                platformInfos.append("\n *    *   Supports double: ").append(device.hasDouble());
                platformInfos.append("\n *    *   Supports half floats: ").append(device.hasHalfFloat());
                platformInfos.append("\n *    *   Supports writable 3d images: ").append(device.hasWritableImage3D());
                platformInfos.append("\n *    *   Supports interop: ").append(device.hasOpenGLInterop());
            }
        }

        logger.info(platformInfos.toString());
        
        //choose devices
        PlatformChooser chooser = null;
        if (settings.getOpenCLPlatformChooser() != null) {
            try {
                chooser = (PlatformChooser) Class.forName(settings.getOpenCLPlatformChooser()).getDeclaredConstructor().newInstance();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Unable to instantiate custom PlatformChooser", ex);
            }
        }

        if (chooser == null) {
            chooser = new DefaultPlatformChooser();
        }

        final List<? extends Device> chosenDevices = chooser.chooseDevices(platforms);
        final Optional<? extends Device> unsupportedDevice = chosenDevices.stream()
                .filter(dev -> !(dev instanceof LwjglDevice))
                .findAny();

        if (unsupportedDevice.isPresent()) {
            logger.log(Level.SEVERE, "attempt to return a custom Device implementation " +
                    "from PlatformChooser: {0}", unsupportedDevice.get());
            return;
        }

        final Set<LwjglPlatform> lwjglPlatforms = chosenDevices.stream()
                .map(LwjglDevice.class::cast)
                .map(LwjglDevice::getPlatform)
                .collect(toSet());

        if (lwjglPlatforms.size() != 1) {
            logger.severe("attempt to use devices from different platforms");
            return;
        }

        final long[] deviceIds = chosenDevices.stream()
                .map(LwjglDevice.class::cast)
                .mapToLong(LwjglDevice::getDevice)
                .toArray();

        if (deviceIds.length < 1) {
            logger.warning("no devices specified, no OpenCL context created");
            return;
        }

        final LwjglPlatform platform = lwjglPlatforms.stream()
                .findFirst()
                .orElseThrow(() -> new RuntimeException("not found a platform"));

        logger.log(Level.INFO, "chosen platform: {0}", platform.getName());
        logger.log(Level.INFO, "chosen devices: {0}", chosenDevices);
        
        // create context
        try {
            long context = createContext(platform.getPlatform(), deviceIds, window);
            clContext = new com.jme3.opencl.lwjgl.LwjglContext(context, (List<LwjglDevice>) chosenDevices);
        } catch (final Exception ex) {
            logger.log(Level.SEVERE, "Unable to create OpenCL context", ex);
            return;
        }
        
        logger.info("OpenCL context created");
    }
Returns a list of the available platforms, filtered by the specified
filter.
<p>
Copied from the old release

@return the available platforms
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java