Loading textures

Hi,

I was wondering if you have a simple C/C++ function(s) to load 2D textures with GLUT.

All I found was NeHe’s texture tutorial, they have Cocoa code - the thing is that I don’t feel like learning objective C righ now…

If u got what I need, email me! Thanks a lot!

If running on Windows or IRIX you can use the Image Format Library from SGI. It supports numerous formats (e.g. PNG, JPG, TIFF, GIF, SGI, etc.). I wish there was a version for Linux.

I also have a the source to load the SGI formats (e.g. INT, INTA, RGB, RGBA) if interested. It was extracted/extended from Brian Paul’s Mesa 3D library.

The fact that this is on the Mac board suggests he’s not using Windows or IRIX :wink:

If you don’t mind mac-specific (QuickTime), try this: http://onesadcookie.is-a-geek.net/~keith/QTValuePak.tar.bz2

Angus Dorbie referred me to this image library:

http://openil.sourceforge.net/

Last I tried to build OpenIL, it was totally broken on the Macintosh (ie. it was going to take several hours work to fix it even to compile; not an effort I wanted to make when QuickTime just works). Is the situation any better these days?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.