@Override public List<? extends Device> chooseDevices(List<? extends Platform> platforms) { synchronized(sync) { if (currentDeviceIndex == -1) { return Collections.emptyList(); } Platform platform = platforms.get(0); availableDevices = platform.getDevices(); selectedPlatform = platform; Device device = platform.getDevices().get(currentDeviceIndex); currentDeviceIndex ++; if (currentDeviceIndex >= availableDevices.size()) { currentDeviceIndex = -1; } return Collections.singletonList(device); } }
continue; //must support interop for (Device d : p.getDevices()) { if (d.hasOpenGLInterop() && d.getDeviceType()==Device.DeviceType.GPU) { continue; //must support interop for (Device d : p.getDevices()) { if (d.hasOpenGLInterop()) { for (Device d : p.getDevices()) { result.add(d);
for (Device d : platform.getDevices()) { if (d.getName().equals(selectedDevice)) { device = d; for (Device d : platform.getDevices()) { if (d.getDeviceType() == Device.DeviceType.GPU) { device = d; device = platform.getDevices().get(0);
private void changePlatform(String platform) { selectedPlatform = platform; Platform p = null; for (Platform p2 : availabePlatforms) { if (p2.getName().equals(selectedPlatform)) { p = p2; break; } } deviceListBox.clear(); if (p == null) { return; } for (Device d : p.getDevices()) { deviceListBox.addItem(d.getName()); } deviceListBox.selectItem(selectedDevice); }
continue; //must support interop for (Device d : p.getDevices()) { if (d.hasOpenGLInterop() && d.getDeviceType()==Device.DeviceType.GPU) { continue; //must support interop for (Device d : p.getDevices()) { if (d.hasOpenGLInterop()) { for (Device d : p.getDevices()) { result.add(d);