Loading .TGA images
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]
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.
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
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement