DevIL texturemapping help!


OK, so the DevIL has a manual teaching you how to load images…so after loading an image in DevIL, how do I use it to texturemap?

Any source code to guide me will be great!

What the heck is DevIl? Any of these “Make your own Doom within 5 minutes” programs for which they want 500$?

Ah, I see, an imagine library… Well, when using OpenGL there are anyway only some less formats of choice and for all of them there is a library included in the nVidia SDK. ( You should use DDS (S3TC) in general. It’s easy loadable and has like no quality loss. For high quality graphics like for the userinterface, you should use then either BMP or JPG. For all of them there are tons of examples in the internet.


Actually, DevIL is quite easy to use with OpenGL and makes loading most images a piece of cake, and I think recent versions have S3TC support.

you can use ilutGLBindTexImage():

// Lets OpenILUT know to use its OpenGL functions.
// Goes through all steps of sending the image to OpenGL.
TexID = ilutGLBindTexImage();
// We’re done with our image, so we go ahead and delete it.
ilDeleteImages(1, &ImgId);

This is from GLtest.c in one of the DevIL examples

ey, where did you grab sample codes for gl? i went to the site ( and found just sdk and docs for download… .

Well, I have it on “”.

Maybe it’s included with the full library source in these new releases.

BlackJack, color cell like compression has significant quality loss. In fact it’s quite nasty for the modest ratio you get (much worse than JPEG at equivalent compression) but it is chosen because it guarantees a fixed compression ratio and so hardware can address it correctly. I could contrive an image that would make you change your mind about quality loss :slight_smile:

[This message has been edited by dorbie (edited 07-02-2002).]