private void updateOpenCL(float tpf) { //advect time time += tpf; //aquire resource buffer.acquireBufferForSharingNoEvent(clQueue); //no need to wait for the returned event, since the kernel implicitely waits for it (same command queue) //execute kernel float scale = (float) Math.pow(1.1, (1.0 - time%2) / 16.0); kernel.Run1NoEvent(clQueue, ws, buffer, scale); //release resource buffer.releaseBufferForSharingNoEvent(clQueue); }