Advertisement

OpenGL Textures

Started by May 20, 2001 12:13 PM
2 comments, last by MikeH 23 years, 6 months ago
Folks, I am looking to create a texture that doesnt follow the normal 64 / 128 / 256 pixel. It currently is 132 x 100. The problem I have is that the only way I can get it to work is to use MipMaps. However, when I use mipmaps, it makes the image look kinda of fuzzy. Is there a way to use mimaps and not have the image look fuzzy? Or can I use some other way to map odd ball textures? Thanks, MikeH
create a texture 256x128 use glTexSubImage2d(..) to upload the 132x100 texture into a corner of it.
now when u draw it use texture coordinates
(0,0)-( 132/256, 100/128 )
theres also a new extension for geforce cards and above that handles non power of 2 texture

http://members.xoom.com/myBollux
Advertisement
Its not good practice to rely on card specific extentions.
That is the kind of stuff that really pisses people off(i''m one of them)

"Those who want it, but can''''t get it, will complain about it.
well the first method uses no extensions.
personally i believe the same thing code two paths for various things so u have a fallback
eg multitexturing
if (card_can_do_multitexturing)
{
}
else
{ // fallbackback method
}

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement