[HOpenGL] Texture Mapping??
hectorg87 at gmail.com
Sun Jul 11 10:25:04 EDT 2010
Thank you very much, I gave it a look but for what I can see they draw the
textures by placing them directly somewhere in 2D and specifying the pixels
positions directly. My game is 3D and the moves are kind of complicated, so
mapping the textures directly into each one of my quads would make my life a
million times easier than using the approach from Raincat, I don't even
think it's posible for me, it would be insane.
Also it would be nice to be able to load the textures using nothing but
OpenGL, so no extra libraries are needed.
On Sun, Jul 11, 2010 at 8:03 AM, <nik.nyby at gmail.com> wrote:
> I also had trouble finding documentation on this topic. I'm not sure
> exactly where you are stuck, but have you tried using SDL-image
> (http://hackage.haskell.org/package/SDL-image) to turn the PNG into an
> IO Surface? That is how Raincat loads textures:
> I hope that helps, in some way.
> On Sat, Jul 10, 2010 at 9:02 PM, Hector Guilarte <hectorg87 at gmail.com>
> > Hello,
> > 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 http://www.haskell.org/~pairwise/HOpenGL/HOpenGL.html, downloaded the
> > sources, compiled them and it worked great, but when I change the code to
> > use a .rgb file created by me with the program they provide from a .png
> > of 256x256 pixels I don't have the same luck... My OpenGL version
> > is 184.108.40.206...
> > I'm really lost in mapping the file, so any kind of help would be greatly
> > appretiated.
> > I checked the textures in the examples of the red book, but they are
> > "procedural" textures, and I need to map an image.
> > One of the pictures I need to map is in
> > http://dl.dropbox.com/u/1476919/Orange256.png
> > Are six like that one and are for making a Rubik's Cube. After I finish
> > I'll upload it to hackage and let you all know.
> > Thanks a lot,
> > Hector Guilarte
> > _______________________________________________
> > HOpenGL mailing list
> > HOpenGL at haskell.org
> > http://www.haskell.org/mailman/listinfo/hopengl
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HOpenGL