Texture Mapping

Started by
3 comments, last by rajivkr9 22 years, 4 months ago
What i seen most of Texture mapping in opengl samples even in NeHe tutorial,use the bitmap having the pixel lenght 64,128,256. Now please tell me how i map the bitmap other than this dimension ? Rajiv Kumar Software Programmer Beehive System Ltd. INDIA.
Rajiv KumarSoftware ProgrammerBeehive System Ltd.INDIA.
Advertisement
The images need to have their width and height as a power of 2. So they can be 2, 4, 8, 16, 32, 64, 128, 256, 512, etc
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
OpenGL requires textures to have dimensions which are powers of two greater than or equal to 16. Either dimension can be 16, 32, 64, 128, 256, 512, 1024, 2048, etc. If you want to use a bitmap with non-power-of-two dimensions, then you have to load it into the next largest power-of-two texture and use the appropriate texture coordinates.

Edited by - TerranFury on November 23, 2001 7:43:53 AM
If you bind the texture using midmaps you can use different size bitmaps(see the Nehe tutorials)on texture filters.
Heh I forgot the greater than 16 bit

/me smacks head
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack

This topic is closed to new replies.

Advertisement