View Full Version : BMP in opengl

03-30-2003, 10:57 PM
I'm writing a program and import some bmp for texture mapping. Since my bmp is in 312*288, but opengl texture map should be 2^n or 2^n + margin, so can I write apiece of code to convert my bmp to 512*512 inside my program? if yes, which code is it?

03-30-2003, 11:54 PM
If you are willing to use mipmapping, you can use gluBuild2DMipmaps : it will resize the image for you before actually building the mipmaps.

Else, you can write your own resizing code. Search for bicubic interpolation for best results.

04-01-2003, 02:42 AM