@Override
    public void simpleInitApp() {
        Context clContext = context.getOpenCLContext();
        if (clContext == null) {
            LOG.severe("No OpenCL context found");
            stop();
            return;
        }
        Device device = clContext.getDevices().get(0);
        clQueue = clContext.createQueue(device);
        clQueue.register();
        
        String source = ""
                + "__kernel void Fill(__global float* vb, float v)\n"
                + "{\n"
                + "  int idx = get_global_id(0);\n"
                + "  vb[idx] = v;\n"
                + "}\n";
        Program program = clContext.createProgramFromSourceCode(source);
        program.build();
        program.register();
        kernel = program.createKernel("Fill");
        kernel.register();
        
        buffer = clContext.createBuffer(4);
        buffer.register();
        
        flyCam.setEnabled(false);
        inputManager.setCursorVisible(true);
        
        BitmapFont fnt = assetManager.loadFont("Interface/Fonts/Default.fnt");
        BitmapText infoText = new BitmapText(fnt);
        //infoText.setBox(new Rectangle(0, 0, settings.getWidth(), settings.getHeight()));
        infoText.setText("Device: "+clContext.getDevices());
        infoText.setLocalTranslation(0, settings.getHeight(), 0);
        guiNode.attachChild(infoText);
        statusText = new BitmapText(fnt);
        //statusText.setBox(new Rectangle(0, 0, settings.getWidth(), settings.getHeight()));
        statusText.setText("Running");
        statusText.setLocalTranslation(0, settings.getHeight() - infoText.getHeight() - 2, 0);
        guiNode.attachChild(statusText);
    }
@param args the command line arguments
jme3-examples/src/main/java/jme3test/opencl/TestMultipleApplications.java