@Override
    public void onAnalog(String name, float value, float tpf) {
        if (!dragging) {
            return;
        }
        if ("left".equals(name)) {
            C.x -= tpf * MOUSE_SPEED;
        } else if ("right".equals(name)) {
            C.x += tpf * MOUSE_SPEED;
        } else if ("up".equals(name)) {
            C.y -= tpf * MOUSE_SPEED;
        } else if ("down".equals(name)) {
            C.y += tpf * MOUSE_SPEED;
        }
    }
This test class tests the capability to write to a GL texture from OpenCL.
Move the mouse around while pressing the left mouse key to modify the fractal.

In addition, this test shows how to use {@link ProgramCache}.

@author shaman
jme3-examples/src/main/java/jme3test/opencl/TestWriteToTexture.java