Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to compile and use Bullet3 with OpenCL support

📅 2015-Dec-02 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Bullet is a popular open-source 3D physics engine. Bullet3 is its fabled branch that uses GPUs and OpenCL in its rigid body pipeline.

$ git clone https://github.com/bulletphysics/bullet3.git

Note: By default, OpenCL examples are not featured in the Example Browser. If you would like to have this, get my Bullet3 fork here or just replace the examples/ExampleBrowser/CMakeLists.txt from it in your repository.

$ cd build3
$ cmake ..
$ make
$ sudo make install
$ examples/ExampleBrowser/App_ExampleBrowser
$ examples/ExampleBrowser/App_ExampleBrowser --enable_experimental_opencl

You must be able to see two new tests listed under OpenCL (Experimental) and be able to try them out.

Tried with: Ubuntu 14.04