Skip to content

johnklucinec/OpenCL-OpenGL-Particle-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCL/OpenGL Interop Particle System

A cross-platform particle system built with OpenGL and OpenCL. For a full breakdown of the project, see the write-up.


Stack

Graphics OpenGL 4.1 Core
Compute OpenCL 1.2
Windowing GLFW + GLAD
UI ImGui
Build CMake

What's Already Done

Joe Parallel has already:

  • Set up the OpenGL window, shaders, VAOs, and VBOs
  • Created and connected the OpenCL context to those buffers
  • Randomized all initial positions, colors, and velocities
  • Written the main loop that calls the particles.cl kernel every frame and draws the result

Note

As explained here, some variables like LOCAL_SIZE are set to nonoptimal values.


Build

cmake -B build
cmake --build build --config

Rebuild and Run

# Windows
cmake --build build && build\bin\Debug\OpenGLApp.exe

# macOS / Linux
cmake --build build && ./build/bin/OpenGLApp

For a more detailed setup guide, see the platform-setup part of the write up.


Contributing

To publish a release with the source ZIP attached, tag your commit and push the tag:

git tag v1.0
git push origin v1.0

GitHub Actions will automatically build and attach source.zip to the release.

About

Cross-platform OpenGL/OpenCL Particle System

Topics

Resources

Stars

Watchers

Forks

Contributors