|
Author Topic:   Texture files, etc.
Kaeto
Member
posted January 07, 2000 02:20 PM            
Ok, now that I have (I think) figured out how OpenGL texturing works ok, I have a question. What file format is the easiest to load and use? What would you reccomend?

IP:

ostra
Member
posted January 07, 2000 03:35 PM            
24-bit BMP is simple, but I recommend using uncompressed TGA images, because you can also store alpha information in them. Just look in the web to find the TGA specifications.

IP:

Kaeto
Member
posted January 07, 2000 04:28 PM            
Umm... I've yet to find a readable spec on ANY GFX file format... Is targa any simpler than the others?

IP:

Nate
New Member
posted January 08, 2000 02:00 AM            
TGA is a very easy format to use. I have some source code on my webpage to load up TGA's and use them in OpenGL. You can also check out www.wotsit.org for more information on the TGA image spec.

------------------
Nate
http://nate.scuzzy.net

IP:

assen
Member
posted January 08, 2000 12:32 PM            
Somebody called Ben Wyatt has written an excellent glPNG library,
which simplifies the loading of textures from PNG files.
http://www.wyatt100.freeserve.co.uk/download.htm

IP:

Kaeto
Member
posted January 08, 2000 05:27 PM            
TGA does rule... I had forgotten wotsit... that site is da BOMB!

Sweet things are happening!

IP:

assen
Member
posted January 12, 2000 05:45 AM            
an additional advantage to glPng which I found out just yesterday is that it scales the textures it loads if they're too big for the current GL implementation, i.e. you can distribute 512x512 .png files to use for textures, and when you run your program on a Voodoo, glpng will downscale them to 256x256 for you and they'll still look correct.

IP:

Kaeto
Member
posted January 17, 2000 03:22 PM            
Well I'm not using glpng because it don't work with VC++ 5.0, and I can't get a newer version...

IP:

Kaeto
Member
posted January 19, 2000 07:35 PM            
Erg! I can't get nate's TGA loader working either... I think it's a curse neither of my machines will work with either...
guess it's time to write my own...

IP:

assen
Member
posted January 20, 2000 04:23 PM            
Kaeto,

life's too short to waste on image file import/export.

What's the problem with VC++ 5.0 and glPng? Unfortunately I don't have 5.0 installed here but if you describe the problem maybe I (or somebody else) will think of something.

The differences between VC++ 5.0 and 6.0, while not exactly minor, shouldn't break a texture loading library.

Feel free to email me, if you think this discussion will be too boring for the rest of the folks.

IP:

Axe
Member
posted February 12, 2000 08:44 PM            
Kaeto,
I started with eyeballing Nate Miller's TGA loading code. I wound rewriting a bunch of it over time.. not because it was broke, but because I wanted to do a few more things with it. I've used his original code in VC5 and VC 6. Elaborate on what probs you are having with his code.

IP:

Kaeto
Member
posted February 16, 2000 07:35 PM            
Well, none now... I was trying to bind textures before I had a valid rendering context... and I ended up using glPNG 'cuz it's so powerfull...

IP: