Question about OpenIL

Started by
0 comments, last by gharen2 16 years, 6 months ago
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?
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.

This topic is closed to new replies.

Advertisement