How to compile and use Bullet3 with OpenCL support

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

  • Take note that you need to have a GPU that has OpenCL support. On my system, I used a NVIDIA GeForce GTX 750 Ti.

  • Install the latest NVIDIA driver for your Ubuntu. The driver installation also installs the Installable Client Driver (ICD) required by OpenCL. On my system, I installed the NVIDIA 352 driver package.

  • Clone the Bullet3 repository:

$ git clone

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.

  • Compile the Bullet3 code and examples:
$ cd build3
$ cmake ..
$ make
  • If you would like to install the library:
$ sudo make install
  • Invoke the Example Browser to try out many physics tests and see how the engine fares:
$ examples/ExampleBrowser/App_ExampleBrowser
  • If you want to try the OpenCL tests, invoke it as:
$ 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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.