Screwed up textures

I’ve written a program, to load some objects, and a texture manager to go with this to stop textures being loaded more than is needed (multiple copies), but the problem comes when I run this on other machines. There doesn’t seem to be a problem with the manager itself because when I run it on my computer (a 1 gig with 512 Mb of RAM and a S3 Savage4) with hardware acc or without it. The problem comes when I try to run it on a Ati Mach64 Rage Pro, most textures work, but many show about half the texture, a quarter screwed up, and an OK quarter. This makes the machine crash on many an occasion.

These textures aren’t square, or in the 2^x by 2^y format since I’m using gluBuild2DMipmaps.

I think I’ve narrowed the problem down to the actual loading of the texture (though it works on other machines with hardware or software rendering), the way it’s scaled to fit the square format (though square pictures sometime still get problems), or the way it’s stored on the gfx card.

Help me!

Simon Hall

Are you explicitly setting the address modes of the texture? Wrap/repeat clamp etc…

Thats the only thing I can think of at the mo…

I have no experience with either of those cards you mentioned.

If youre using mipmaps, are you sure you’ve called

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

when creating the texture.

So gl knows it’s actually mipmaps.

Nutty

Yep, I’ve run exactly the same line of code, and it still gives the same error. I could also try using it without mipmaps, but my loader is broken so far in that department. Could be the same reason that it doesn’t work properly with mipmaps…

Simon Hall