Buddhabrot renderer using CUDA.
C++ C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Debug
src
.cproject
.gitignore
.project
LICENSE_GPL.txt
LICENSE_MIT.txt
Readme.md
cuddha.sublime-project

Readme.md

cuddha

Examples

tbd.

Overview

cuddha is an attempt to build an extensible Buddhabrot renderer using the CUDA library. I have built a renderer in Java a while back, which was fun to play with but limited by the performance of Java and my CPU.
So, I decided to rebuild the whole thing in C++/CUDA from the ground up, learning something about CUDA and GPU performance considerations.

Usage

Warning: If you are using the same GPU as CUDA and display device, this could cause your PC to hang or crash. I did my best to minimize this, but depending on the used parameters, the kernels could take a lot of GPU time. Use at your own risk.

Dependencies

Get these manually or by searching the package manager of your distro:

  • CUDA 5.5
  • libGLEW
  • libGLFW3

If you are not running Xorg, you might need to tweak around with the linker settings in Debug/objects.mk to include your display server.

Compiling and Running

I used Eclipse Nsight (bundled with the CUDA SDK) to build the project, which generates Makefiles in the Debug directory.
If you don't have/want Nsight, the easiest way would be to have your CUDA installation in /usr/local/cuda-5.5/ and then run make from the Debug folder:

ln -s /path/to/your/cuda/ /usr/local/cuda-5.5/ # only if different on your machine

git clone https://github.com/cfstras/cuddha
cd cuddha/Debug
make
./cuddha

When hitting the close button on the preview window, the current batch is finished (this could take up to 10 seconds) and a bitmap with the current state is saved to the output folder.

Details

Some implementation details: tbd.

Contributing

If you have ideas for different render modes or output conversions, I'm happy to receive mail!
If you want to code, just fork and pullrequest me once you have something interesting! 😄

License

The main code of this program is released under the MIT license, with the exception of the files bmp.c and bmp.h. These are released under the GNU GPLv3 License.
For details about those licenses, see the files LICENSE_MIT.txt and LICENSE_GPL.txt.