as an exercise I'm trying to render the Mandelbrot set using Haskell. I'm using gloss to display the result. So far I got the math correct, and displaying works. At the moment I generate a [[Word8]] which represents the iterations it took for each pixel to run to infinity and convert that to a ByteString, which I use to construct a gloss Picture, which I display. It works all fine and dandy and up to a resolution of a couple 100 pixels as width and height it goes reasonably fast, but then it takes way to long. So, to change that I am now trying to use accelerate to use the GPU to render, but I just don't have any idea what to do. It starts with what library to use. Plain accelerate? gloss-accelerate? gloss-raster-accelerate? I think, I have to use the last one. In the module Graphics.Gloss.Accelerate.Raster.Array a function makePicture exists, which I think I have to use, but I can't make sense of all the parameters and I haven't found a lot of documentation.
Could somebody explain the makePicture funktion to me, or at least point me to somewhere it is a bit more explained. A working example, which I can adjust to my case would be nice.