PDA

View Full Version : .tga loading for textures, different on Unix (Mesa Opengl) vs. PC?



BigShooter
11-30-2003, 12:07 AM
I wrote a CTexture class, which supports loading of .tga files. It works perfectly on PC (the code is based on the book "Opengl game programming"). However, when I run the same code on unix machine (Mesa Opengl), the objects read the texture, no crashes, but don't display anything... that is the objects are shaded with lights and such, but all of them are default color, no texturing.
Are there any differences when reading tgas files on Unix as opposed to PC ? Or perhaps differences in turning on textures or displaying them?

Thank you,
Luke

Eric Lengyel
11-30-2003, 02:52 AM
Have you considered endian issues?

jwatte
11-30-2003, 08:01 AM
Have you considered structure alignment rules used by the different compilers.

Have you considered adding printf() to the code to see what it's doing?

Have you considered stepping through the loading code in GDB and examining the data as it's being prepared?

Have you considered sprinkling assert(!glGetError()) everywhere in your code to figure out where it's going wrong?

BigShooter
11-30-2003, 11:59 AM
Thank you for the hints.
I'll put all of them to use.

Luke