Flocking with OpenCL


Fish swimming in the sea! Alogirthm implemented using openCL for 3rd year Advanced Games Programming module.
OpenCL implementation of a standard flocking algorithm. Rendered using OpenGL with SDL.
Running on Radeon HD5450 because I can't afford better.

Code Snippet: 

__constant float MAX_SPEED = 0.1f;
__constant float MIN_URGENCY = 0.0005f;
__constant float MAX_URGENCY = 0.001f;
__constant float VIEW_DIST = 4.9f;

typedef struct {
float4 pos, vel, accel;
int iBoidSeen;
} Boid __attribute((aligned(32)));

User login