summaryrefslogtreecommitdiffstats
path: root/balls.cl
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-10-28 11:09:12 -0400
committerSam Anthony <sam@samanthony.xyz>2024-10-28 11:09:12 -0400
commit93a3f005480effe48513e7bc81161db1adc43f32 (patch)
tree64eeca36d8fc5c26663212db9210bc86d63dcd52 /balls.cl
parent613c6f7390cfc85a440b8aef3ec6e9d88529e526 (diff)
downloadballs-93a3f005480effe48513e7bc81161db1adc43f32.zip
move
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;