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

11-29-2003, 11:07 PM
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,

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

11-30-2003, 07: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?

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