Texture more then 1024*1024

Started by
3 comments, last by Rossetti 22 years, 3 months ago
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
Rossetti
Advertisement
Yes, sure, if your 3D card supports it.
And when is not supported from the card?
If you have a Voodoo1, 2 or 3 or some other old card
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

This topic is closed to new replies.

Advertisement