private static long[] getPlatforms() {
        try (MemoryStack stack = MemoryStack.stackPush()) {

            final IntBuffer countBuffer = stack.callocInt(1);
            int errcode = CL10.clGetPlatformIDs(null, countBuffer);
            Utils.checkError(errcode, "clGetDeviceIDs");

            final int count = countBuffer.get();
            final PointerBuffer pointer = stack.callocPointer(count);

            errcode = CL10.clGetPlatformIDs(pointer, (IntBuffer) null);
            Utils.checkError(errcode, "clGetDeviceIDs");

            final long[] platformIDs = new long[count];
            for (int i = 0; i < count; i++) {
                platformIDs[i] = pointer.get();
            }

            return platformIDs;
        }
    }
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