Jump to content
  • Advertisement
Sign in to follow this  
Arbel

OpenGL Question about OpenIL

This topic is 3933 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

So I'm taking an independent study on Game Programming using OpenGL. I've learned how to manage audio as well using OpenAL and now I want something that will manage by images, hence why I choice OpenIL (also known as DevIL) I've gone through a few tutorials. I've learned how to load images, save images, transform, crop etc etc. But I really can't find an easy way to just display it. It seems that most of the examples are images to be used as textures in 3d games, but I'm only doing 2d stuff atm and just want to display a simple jpeg background image. Is OpenIL something I shouldn't be using for simple image display? I've also heard GDI (or something like that) is useful, but I don't have any tutorials on it. Basically my question, for a 2D game where I want to display images and simple animation, what should I use for displaying images? Or is OpenIL a good choice and I'm just not using it right?

Share this post


Link to post
Share on other sites
Advertisement
DevIL isn't intended for actually displaying images at all. Just loading and manipulating them.

So you load the data, and pass it on to another library (opengl, gdi, sdl etc) for displaying.

If you want purely 2D, I'd suggest looking at SDL. There should be tons of tutorials out there on using the two together (SDL actually has image loading capabilities, but they're more limited than DevIL).

On the other hand, there's no reason you can't use opengl for 2D. Just load the image data into textures, and render the textures to 2D quads. Look up rendering in an orthographic projection.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!