Fastest way to resize a texture?

Started by
1 comment, last by zedz 16 years, 6 months ago
What is the best way to dynamically resize a texture? For instance, I'm currently allocating a full screen sized texture for doing offscreen rendering and it needs to resize as the window is resized. Is there an optimal way of resizing the texture without creating a new one and destroying the old one?
Author Freeworld3Dhttp://www.freeworld3d.org
Advertisement
I am not 100% sure I understand your question, but I will take a shot. If you are using DirectX, when you create the texture you can setup a desired number of mip levels and mip filter to create a mip chain (automatically create different scales of the source image). The MIP filter will then specify how the system will calculate the (in betweem MIP level) representation.

Hope this helps.

Cale
the fastest way is just have the maximum texture size + then only render into a small region of it when the screensize changes
though alternatively i dont see whats to wrong with destroying + recreating (at different size) the texture casue
A/ screen resize aint gonna happen that often
B/ creating a textures is normally pretty fast ie should be <1msec

This topic is closed to new replies.

Advertisement