int dev = deviceList.getSelectedIndex();
if (dev >= 0 && dev < deviceList.getItemCount()) {
device = (CLDevice) deviceList.getItemAt(dev);
}
if (platform != null && device != null) {
CLRenderManager manager = new CLRenderManager(parent);
manager.setupOpenCL(platform.id, device.id, world, chunks);
manager.start();
setVisible(false);
dispose();
}
}
});