Archived

This topic is now archived and is closed to further replies.

Rossetti

Texture more then 1024*1024

Recommended Posts

Rossetti    122
Hi I have a question is posible use a BMP TEXTURE for a rendering in opengl is more then 1024*1024. I hope anyone help me thanks for your time. bye

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
If you have a Voodoo1, 2 or 3 or some other old card

Share this post


Link to post
Share on other sites
merlin9x9    174
The best thing to do so you can have a large texture like that but still have your app work properly on older hardware is this: at runtime, scale the texture to the maximum size if its original size is greater than the maximum size. Use glGetIntegerv with the GL_MAX_TEXTURE_SIZE constant to determine the maximum texture size (both width and height will always be the same). If the texture's width or height is greater than the returned value, use gluScaleImage to scale your texture to the returned value—you can even use the same buffer you used to load the texture in the first place. Then create the texture as normal. So, on newer hardware, your texture will be in its full, hi-res glory; on archaic hardware, it will be the same image, but the highest res it can handle.

Edited by - merlin9x9 on January 4, 2002 8:13:55 AM

Share this post


Link to post
Share on other sites