Sign in to follow this  

Fastest way to resize a texture?

This topic is 3719 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

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This topic is 3719 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this