Mandelbrot set compute pipeline functional in racket-vulkan
Sage Gerard <sage-nnKKxiom5Z1/[email protected]>
| Newsgroups | gmane.comp.lang.racket.user,gmane.lisp.scheme.plt |
|---|---|
| Message-ID | <fgVgu2eaQhFCyXhiyOqLpgLu-Iy8pNJ9mIO8ITcUq_JaDaL_j1FGQ6n22IkyqFmeX6h62c-gRDWBQqns6RGh5ZFb185Vp-JXybAF6rEE4h4=@sagegerard.com> |
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`. Unpolished Racket source here: https://github.com/zyrolasting/racket-vulkan/blob/master/examples/mandelbrot.rkt I'm feeling increasingly confident this can be used more widely in the Racket community. ~slg -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/fgVgu2eaQhFCyXhiyOqLpgLu-Iy8pNJ9mIO8ITcUq_JaDaL_j1FGQ6n22IkyqFmeX6h62c-gRDWBQqns6RGh5ZFb185Vp-JXybAF6rEE4h4%3D%40sagegerard.com.
mandelbrot.png
(image/png, 360.6 KB) - not displayed