• Advertisement
Sign in to follow this  

[SlimDX]Shrinking and Stretching Textures

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

Is there an easy way to shrink or stretch a texture to a certain height or width in pixels? I am currently using Device.SetTransform() to do it before rendering, but it is kinda a hassle.

Share this post


Link to post
Share on other sites
Advertisement
Why do you want to resize the texture itself? If you are working with texels just move the VERTEX coordinates.

Share this post


Link to post
Share on other sites
I am working with SlimDX's Sprite and Texture classes. Should I ditch those classes in favor of using quads?

Share this post


Link to post
Share on other sites
Some overloads of the texture loading functions take size parameters that allow you to resize the texture at load time. That might work better for what you're doing.

Share this post


Link to post
Share on other sites
Actually, I tried that. The width and height in the constructor don't shrink the texture, instead, they cut the texture to that size.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement