View Full Version : DevIL texturemapping help!
06-29-2002, 12:04 AM
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!
06-29-2002, 07:42 AM
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. (www.nvidia.com) 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.
This is from GLtest.c in one of the DevIL examples
06-30-2002, 06:43 AM
ey, where did you grab sample codes for gl? i went to the site (www.imagelib.org) and found just sdk and docs for download... http://www.opengl.org/discussion_boards/ubb/frown.gif.
Well, I have it on "DevIL-1.2.0.zip".
Maybe it's included with the full library source in these new releases.
07-02-2002, 06:22 PM
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 :-)
[This message has been edited by dorbie (edited 07-02-2002).]
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.