View Full Version : Load any Image file with GLut?
06-16-2005, 06:50 AM
Hi I want to be able to load any image file (any kind of extension) and use it as a texture. I could only find a loadTGA example which seemed way to complicated for this task..
Could u give a kind of generic code snippet to work with?
I can give you an idea - use photoshop's *.raw format - it's very simple, can't imaging more simple format. Or if you think TGA loader is too complicated try to look at png, jpeg or tiff loading code (libpng, jpeglib and libtiff are available in inet, use google) and you will see that TGA is one of the simplest among existing formats. And finally uncompressed BMP format is fairly easy for loading, i believe that nehe site have code of BMP loading...
06-16-2005, 08:44 AM
look for devil this is a library that supports a lot of different image formats. If you want to write all your own forget about that.
I agree with the previous post for easy reading try the raw format.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.