Skip to content

Boids steering model with OpenGL/CUDA interop, rendering boids as individual points.

Notifications You must be signed in to change notification settings

boingboomtschak/cuda-boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuda-boids

A quick experiment in OpenGL / CUDA interop, using the boids steering model as a focus. Boids are drawn as single points and rendered from device memory. A buffer for boid objects is created with OpenGL, registered with CUDA, and then the CUDA kernel moves each boid by accessing that buffer memory directly, requiring no transfer between host and device memory.

CudaBoids_EdO5CMbuOH.mp4

Boids are colored according to their heading (X component mapped to R channel, Y component mapped to G channel, Z component mapped to B channel), allowing for a primitive visualization of groupings. The movement rules followed by each boid can be weighted by constants in the program, and affect the overall order of the system.

About

Boids steering model with OpenGL/CUDA interop, rendering boids as individual points.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published