[HOpenGL] Textures from SDL upside down

Bas van Dijk basvandijk at home.nl
Mon Mar 5 18:25:01 EST 2007


Hi,

I am using HOpenGL in combination with hsSDL
(http://darcs.haskell.org/~lemmih/hsSDL). This works great except for
texture loading. All my textures are mirrored over the v-axis. So the
top of a texture becomes the bottom. I first thought that I got the
texture coordinates wrong. But the textures are also flipped on the GLU
quadrics.

Is there some way to tell (H)OpenGL that a texture is mirrored? I tried
glPixelStore parameters but I don't think it is possible that way.
Perhaps it is possible to change a hsSDL surface before loading the
pixel data. Any advice is welcome.

regards,

Bas van Dijk


More information about the HOpenGL mailing list