Jump to content
  • Advertisement
Sign in to follow this  
soconne

Fastest way to resize a texture?

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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!