Not sure how to do this without GLFW, but with that library, here's the code:<div><a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27322#a27322">http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27322#a27322</a></div>
<div><br></div><div><a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27322#a27322"></a>You must convert your PNG file to a TGA file for GLFW.</div><div><br><div class="gmail_quote">On Sun, Jul 11, 2010 at 6:07 AM, Hector Guilarte <span dir="ltr"><<a href="mailto:hectorg87@gmail.com">hectorg87@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><span style="font-family:arial, sans-serif;font-size:12.5px;border-collapse:collapse">Hello,<div><br></div><div>I already send this to the HOpenGL list, but I'm kind of in a hurry with this and I'll probabbly get more responses from you...</div>
<div><br></div><div>I've been looking for a way to map a texture into a Quad primitive with HOpenGL with no luck. I've already done this in C++ and had no problem. I did the tutorial in <a href="http://www.haskell.org/~pairwise/HOpenGL/HOpenGL.html" style="color:rgb(35, 87, 195)" target="_blank">http://www.haskell.org/~pairwise/HOpenGL/HOpenGL.html</a>, downloaded the sources, compiled them and it worked great (After changing a 2 lines to make it work with OpenGL's latest version), but when I change the code to use a .rgb file created by me with the program they provide from a .png file of 256x256 pixels I don't have the same luck... My OpenGL version is 2.4.0.1... </div>
<div><br></div><div>I'm REALLY lost, clueless, so any kind of help would be greatly appreciated.</div><div><br></div><div>I checked the textures in the examples of the red book, but they are "procedural" textures, and I need to map an image.</div>
<div><br></div><div>One of the pictures I need to map is in <a href="http://dl.dropbox.com/u/1476919/Orange256.png" style="color:rgb(35, 87, 195)" target="_blank">http://dl.dropbox.com/u/1476919/Orange256.png</a></div>
<div>Are six like that one and are for making a Rubik's Cube. After I finish it I'll upload it to hackage and let you all know.</div><div><br></div><div>Thanks a lot,</div><div><br></div><font color="#888888"><div>
Héctor Guilarte</div></font></span>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>