Mandelbrot set compute pipeline functional in racket-vulkan

86 views
Skip to first unread message

Sage Gerard

unread,
Oct 28, 2019, 5:54:33 PM10/28/19
to users\@racket-lang.org
Finally got Vulkan working in a non-trivial application. Attached is a rendering of the Mandelbrot set created from a compute pipeline originally from https://github.com/Erkaman/vulkan_minimal_compute

I ported that project to Racket, minus the PNG encoder. I dumped the RGBA samples to disk and used `convert -size 3200x2400 -depth 8 mandelbrot.rgba mandelbrot.png` to save time.

The code is nearly a one-to-one translation from C to Racket. This means that while the Vulkan bindings are unsafe, this is evidence that you can pick up a C/C++ program or tutorial from elsewhere and hand-write a Racket equivalent using `racket-vulkan`.


I'm feeling increasingly confident this can be used more widely in the Racket community.

~slg


mandelbrot.png

Simon Schlee

unread,
Nov 3, 2019, 6:30:40 AM11/3/19
to Racket Users
Thank you, for creating this!

Currently I am still using opengl for my projects, until I have time to learn vulkan and port to it.
I created a pull request which saves the image via a bitmap% to get rid of the external `convert` program.
Reply all
Reply to author
Forward
0 new messages