Textures are mirrored (DevIL/LibPNG)
mirror them in photoshop? =)
no, seriously.. you could manually change the pixels after you´ve loaded the textures... I don't know how your texture loading code looks, so you´re on your own there...
It's seems like the easiest way would be to mirror them in photoshop thou... :)
no, seriously.. you could manually change the pixels after you´ve loaded the textures... I don't know how your texture loading code looks, so you´re on your own there...
It's seems like the easiest way would be to mirror them in photoshop thou... :)
Quote:Original post by thorpe
When I load my textures using DevIL, they get mirrored. How do I get around these problems?
You're probably drawing your quads/triangles in the wrong vertex order (or maybe the texcoords). Mess around a little until it gets right.
Thing is, everything worked properly before when I had my own bmp read code. When I call glu functions, the textures get mirrored and I want to be able to use glu (and have proper coordinates). I suspect you have to call some DevIL function but I can't find any good example code.
Well, you could try using the texture matrix. Just add a glScalef on it to mirror around the axis in question.
No, the texture matrix is applied to the texture coordinates, not the textures, so you would have to have this transformation there every time you render an object that needs the texture coordinates mirrored.
Perhaps not the best solution, but it's a solution ;)
Perhaps not the best solution, but it's a solution ;)
Cheers!
Managed to solve it with iluFlipImage() which flips it around the x-axis (while iluMirrorImage() flips it around the y axis - good naming :) ). Quite ineffective having to flip the image once loaded though. DevIL doesn't seem to be too good implemented and documentation sucks.
ilOrigin() didn't work which would do these things before loading didn't work :(
Ah well, now it's working....
Thanks guys!
Managed to solve it with iluFlipImage() which flips it around the x-axis (while iluMirrorImage() flips it around the y axis - good naming :) ). Quite ineffective having to flip the image once loaded though. DevIL doesn't seem to be too good implemented and documentation sucks.
ilOrigin() didn't work which would do these things before loading didn't work :(
Ah well, now it's working....
Thanks guys!
You're welcome. :)
I read some more docs, and I assume that it's ilOriginFunc you've tried? You need to do ilEnable(IL_ORIGIN_SET) for it to work.
I read some more docs, and I assume that it's ilOriginFunc you've tried? You need to do ilEnable(IL_ORIGIN_SET) for it to work.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement