I need to apply a texture in a polygon. So I searched and I found many sources but i'm most of them I had problems in include and loading BMP picture. (developing in visual cpp 10). So can anyone tell-me the easy way to load a BMP file and how to apply the texture?
An easy way is to use GDI+ class Bitmap:
http://msdn.microsoft.com/en-us/library/ms534420%28v=vs.85%29.aspx
You create an object with a constructor which takes a filename and then get a pointer to the buffer which contains the pixels using LockBits() method. That method gives you a pointer to a buffer which you can send to OpenGL texture functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With