PDA

View Full Version : BMP in opengl



tsk
03-30-2003, 11: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?

kehziah
03-31-2003, 12:54 AM
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.

miko
04-01-2003, 03:42 AM
gluScaleImage