How to load bmp files for texturing in C++

Hello ,

Is there any good example code with explanation for loading BMP file for texturing using C++ ?
I tried to take a look at Nehe.gamedev.net and they are using some old GLAUX.h which does not exist any more and one of the other video tutorial website does not show how they loaded the bmp files they just showed how to apply loaded bmp file for texturing.

Thanks
Chayan Vinayak

Use one of these.

Thanks Alfonse !

I tried using SOIL library. I copied all the header files,SOIL.h and SOIL.c file in the same folder where my Main.cpp file is and then I imported files in the project(by dragging and dropping the files), I also put all header files and SOIL.h file in ‘Header files’ folder and SOIL.c in ‘Source Files’ but still main.cpp is not recognizing the SOIL functions.

Or - you could take a look at this short, self-contained, demo that loads .bmp files and displays them as images (glDrawPixels) and textures. Source code is included …

http://www.mfwweb.com/OpenGL/Loading_Textures

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.