I'd like to thank everyone for the help, I figured it out and thought
you guys would want to know what was going on.
Now I "knew" the code was perfect because I lifted it straight out of
another program of mine that worked fine. Well after trying tons of
stuff I started to think the problem might be in the loading of the
texture. While messing around with the call to gluBuild2DMipmaps, I
noticed that if I passed the wrong number of bytes for internal format,
while the texture looked wrong things weren't disappearing. It also
looked like the problem was happening during mipmap transitions (which
would explain why they seemed to be somewhat depth related). Well after
messing around with the problem more, I figured out what was going on.
My PNG which I told to save with transparency, didn't have it. So
instead of RGBA format, the data was in RGB. The colors were still
right because it was reading 4 bytes per pixel (so it was skipping the
nonexistent alpha information). For some reason this only manifested
it's self in making mipmaps, The other computer I tested this on had a
software OpenGL renderer that could handle this for some reason (what I
was doing was wrong, so it's understandable that it wasn't handled
correctly).
Thanks for all the suggestions. Without some of them (especially the
depth problem that made me look into mipmaps) I'm not sure I would have
found this. It explains why previously working code seemed to
malfunction when it was copy and pasted.
Thanks again guys.
|