public void Init()
        {
            rle = new RLEFile("../../data/turing_js_r.rle");
            //rle = new RLEFile("../../data/metapixel-galaxy.rle");
            pattern1 = new OpenCLBuffer <uint>(ocl, (int)(rle.W * rle.H));
            pattern1.CopyToDevice();
            pattern2 = rle.ToCLBuffer(ocl);
            pattern2.CopyToDevice();

            //create an OpenGL texture to which OpenCL can send data
            image = new OpenCLImage <int>(ocl, res.x, res.y);
        }
 public void SetArgument(int i, OpenCLImage <float> v)
 {
     kernel.SetMemoryArgument(i, v.texBuffer);
 }