PDA

View Full Version : Display Image



tafazolisina
07-21-2009, 02:31 AM
Hi;

How is it possible to display an image file like JPG, PNG, GIF in openGL? I am trying to apply following approach without success

- With the use of DEVil (OpenIL) "ILboolean ilLoadImage(const char *FileName)" function which is supposed to load various types of images. I don't know where it loads the image data, how to use glDrawPixel to draw the image.

is there any other way to display image file with openGL?

Best,
tafazolisina

dletozeun
07-21-2009, 03:17 AM
With the use of DEVil (OpenIL) "ILboolean ilLoadImage(const char *FileName)" function which is supposed to load various types of images. I don't know where it loads the image data


DevIL is IMO one of the simplest library for image loading. Did you at least, make the effort to read the documentation? I am pretty sure you did not.

Look, there are also tutorials:
http://openil.sourceforge.net/tuts/index.htm