Jump to content
  • Advertisement
Sign in to follow this  
Roots

OpenGL Recommendations for a good image library?

This topic is 5462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a project right now (sig) and we are trying to decide on what image library to use. The game is written in C++, SDL, and OpenGL. Here are the requirements we need this library to meet: 1) Must have JPEG and PNG support. 2) Must be platform indpendent. Should be able to run on Linux, Windows, MacOS X, BeOS with no big problems. 3) Must not be slow or sluggish. At first we took a look at using SDL_Image, but our graphics programmer said there was overhead in changing the returned SDL_Surface to something usable by OpenGL, so that was ruled out. Next we tried imlib2, but that didn't look platform independent. Right now we have been using something called FreeImage, but we have issues with the library installation scheme (but other than that it looks like its great for us). So is there something better out there than FreeImage? Or should we deal with it and link to FreeImage statically within our own program? Thanks for any advice.

Share this post


Link to post
Share on other sites
Advertisement
How about devil/openil, can't say I've use it myself (I prefer to write my own image library), but I hear lots of good things about it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Roots
At first we took a look at using SDL_Image, but our graphics programmer said there was overhead in changing the returned SDL_Surface to something usable by OpenGL, so that was ruled out.


He's wrong, by the way. Unless the image isn't in a useful format, in which case you have to do that no matter what library you use. Normally you can just point the OpenGL at the raw surface data and tell it what format it's in.

But DevIL does seem pretty good. It's used by Ogre3D and many others.

Share this post


Link to post
Share on other sites
I use libjpeg and libpng for my image loading ... its pretty easy to wrap them up in their own texture manager class and both of them are very fast and support exactly what your after. It'll be more work than just useing a prebuilt lib but you can be sure it doesn't include any bloat and you can make it work however you want. Both those libs return an array of bytes that you can pass straight into openGL to create textures (which is what i do) which makes incorperating it into a 3D app real easy.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!