View Full Version : possible image formats for texture mapping
05-12-2003, 04:53 AM
I'm working on linux, and using Mesa 5.0. I need some simple examples on texture mapping.
I want to know whether it is possible to apply texture mapping using a variety of image format or not.
For example is it possible to use bitmap or jpeg?
05-12-2003, 04:58 AM
I have successfully used BMP, JPEG and TGA file formats as textures, (I don't believe there is any real limitations as from what I can tell you basically decode the format when you read it and use the raw image data as your texture).
However there are some limitations in terms of there usefulness from what I have seen. For instance, transparencies with JPEG's is difficult (not impossible but..) because it doesn't support an alpha channel.
[This message has been edited by foniks (edited 05-12-2003).]
The only limitation in what formats you can use is what formats you, as a programmer, can write a loader for. OpenGL has no functions for loading any kind of images, so you have to do it yourself. Either with your own code or using a third party library, but OpenGL won't do it for you.
So as long as you have a loader for the format you're interested in, you can use it as a texture in OpenGL.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.