Reputation: 71
I am looking for the fastest and easiest way to use PNG (with alpha values) textures in OpenGL. I have tried many different libraries but most are bloated and hard to get compiled/working on a Mac.
I'm not very familiar with OpenGL textures and all of the "Gotchas" so I am putting emphasis on the Simple.
It would be very helpful if someone could give me a nice makefile example if the solution involves linking a library.
Thanks!
Upvotes: 2
Views: 1217
Reputation: 48257
DevIL can do this pretty simply and easily, for quite a few formats. It also have a very, very similar API to OpenGL (by design, most constants are identical, etc). It took me just a few minutes to hook it into an OpenGL app I had. The docs aren't great, but it does the job and supports a lot of formats.
Upvotes: 1
Reputation: 52337
sdl and sdl_image is the simplest way I know of: http://www.libsdl.org/ http://www.libsdl.org/projects/SDL_image/
However, this is for cross-platform. For Mac-only I guess there is a native alternative.
Upvotes: 1