🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Loading .TGA images

Started by
3 comments, last by StarikKalachnikov 18 years, 7 months ago
Hello! Is it possible to load other image format besides .bmp? I need to use .gif, .tga or any of those formats that can be transparent. thanks [Edited by - Chon-Ji on November 26, 2005 7:39:48 AM]
Advertisement
Yep there sure is, have a look at lesson 33 for Targas. If you want to load other formats such as gif and png then have a look at the Wotsit website for the file specification.

There are libraries, such as DevIL, that can do the grunt work for you but I don't have any experience with those so I shall let somebody else comment on them.

Hope that helps.
--
Cheers,
Darren Clark
Don't use that lesson to learn how to load TGA's, it's horrible.

Grab the specification from Wotsit.org instead, and use that to construct your own loader. You'll learn much more, and it'll be much more standards compliant.
If at first you don't succeed, redefine success.
the OpenGL Texture Manager Example supports tga, bmp & pcx. Handles colour-mapped and RLE compressed tga's....

You might want to use devil though. It's pretty damn good. Trying to write your own png, jpg or tiff loader requires more ability and time than most people have ;) There are seperate libs available to load and save those formats, however if you use devil, you get all of those wrapped up in a single easy to use interface.
Hi there, this link may be pretty usefull:

GameProgrogramming WIKI
Next time I give my advice, I'll buy some bubblegum so I won't your kick ass!

This topic is closed to new replies.

Advertisement