[Haskell-beginners] Trying to read a bitmap with hOpenGL
Peter Verswyvelen
bugfact at gmail.com
Tue Aug 4 11:54:15 EDT 2009
You didn't provide the smiley.bmp image, so I made my own 24-bit bitmap.
When loading it and printing the width/height in your bmp loader, I get
twice a zero, so your loader seems incorrect.
I don't have the time to dig deeper into your loader function, but maybe you
can find some inspiration using this code:
http://code.haskell.org/ANUPlot/ANUPlot-HEAD/
A BMP loader can be found in
http://code.haskell.org/ANUPlot/ANUPlot-HEAD/src/Graphics/Plot/
<http://code.haskell.org/ANUPlot/ANUPlot-HEAD/src/Graphics/Plot/>Cheers,
Peter
On Mon, Aug 3, 2009 at 9:51 PM, <builes.adolfo at googlemail.com> wrote:
> Hi All,
>
> I have been following an OpenGL book which has its examples in cpp, but
> using haskell instead. I have a problem when trying to read a bitmap, I
> haven't managed to render the file to the buffer, I did a little parser
> based on the one in RWH for the bmp file, and apparently everything seems to
> work well, but when I call drawPixels I don't get a clear image. The code
> that I'm using is here :
> http://gist.github.com/160787
>
> What am I doing wrong ?
>
>
>
> Thanks in advance for any help.
>
> abuiles
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090804/9091633d/attachment-0001.html
More information about the Beginners
mailing list