Hi!

On 4/17/07, Sebastian Sylvan <[EMAIL PROTECTED]> wrote:
I would suggest chunking up your work (assuming that calculating your colour
is indeed a significant amount of work) in tiles or something, then fork off
a thread for each of them, sticking the final colours in a Chan. Then you
have another thread just pick tiles off the Chan and copy the results to the
frame buffer.

Is there some completely different and maybe better way of rendering
the image? Because I noticed that in fact I do not really have any use
for OpenGL (I draw pixels on a 2D plane). So maybe is there some other
portable way of rendering a 2D image, which would be easier to
parallelize? Maybe of precomputing the image in completely functional
way and then only draw the whole image at once to the screen buffer
(now I call OpenGL draw pixel function for every pixel I want to draw
- this is probably not the best way).


Mitar
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to