summaryrefslogtreecommitdiffstats
path: root/balls.cl
diff options
context:
space:
mode:
Diffstat (limited to 'balls.cl')
-rw-r--r--balls.cl8
1 files changed, 8 insertions, 0 deletions
diff --git a/balls.cl b/balls.cl
index 6400bca..0c235c1 100644
--- a/balls.cl
+++ b/balls.cl
@@ -1,6 +1,14 @@
#define RADIUS 0.15f
__kernel void
+move(__global float2 *positions, __global float2 *velocities) {
+ size_t id;
+
+ id = get_global_id(0);
+ positions[id] += velocities[id];
+}
+
+__kernel void
genVertices(__global float2 *positions, __global float2 *vertices) {
size_t ball, nsegs;
float2 center;