PDA

View Full Version : opengl texture



ywwlinux
07-02-2003, 08:59 PM
i enabled gl_texture_2d in my opengl program.
i used a bitmap(256 * 256) picture,it works correctly, but the texture didn't affect when the pictue's size was changed (not
256 * 256).
where is probably the problem? thanks.

Acheum
07-02-2003, 10:48 PM
In opengl, you can use only textures with a size of a power of 2... If your new size is not a power of 2, it's normal that you see nothing !

Draco
07-04-2003, 05:30 AM
You can use the NV_texture_rectangle extension to handle non power of two textures.
If you want to work with power of two texture on the base of a rectangular image use the glScaleImage func