Hi,
I want to add some texture to my polygon.
So far I did not come across any tutorial that speaks of uploading a texture from some place…they only talk of binding it to objects.
Could some one direct me to a link, or give me an example of uploading a texture file.
I am wondering what kind of file (by which i mean in which format) does the file need to be…
First openGL does not have any file loading functions, the texture file will have to be loaded by a file loading routine. There are lot’s of them floating around.
You can also find BMP, JPG, GIF, texture loaders out there also. nehe.gamedev.net has an example of a BMP and TGA also.
Originally posted by lara:
[b]Hi,
I want to add some texture to my polygon.
So far I did not come across any tutorial that speaks of uploading a texture from some place…they only talk of binding it to objects.
Could some one direct me to a link, or give me an example of uploading a texture file.
I am wondering what kind of file (by which i mean in which format) does the file need to be…
To to www.imagelib.org Its the home of devIL. A image loading library with the same syntax setup as OpenGL. Very native to opengl, and make things like mip mapping, and such very easy.
Well, I finally opbtained quite a few file loading routines for tga files…but they all are in C,
and as i have my program all coded in C++, i guess it is giving me problems.
Would someone have a tga file uploading routine in c++ that i could use.
Moreover i have some problems understanding the texture id… is that just nay random number we assign to the image in the main function?
Originally posted by lara:
[b]Well, I finally opbtained quite a few file loading routines for tga files…but they all are in C,
and as i have my program all coded in C++, i guess it is giving me problems.
Would someone have a tga file uploading routine in c++ that i could use.
Moreover i have some problems understanding the texture id… is that just nay random number we assign to the image in the main function?