Archived

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

Texture more then 1024*1024

This topic is 5820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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