Jump to content
  • Advertisement
Sign in to follow this  
ms75214

original width of a DirectX texture

This topic is 2789 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 any way to find the original width of a DirectX texture image? For instance, if an image is 541 pixels wide but gets scaled to 1024,

I want to get the 541.

Share this post


Link to post
Share on other sites
Advertisement
How did the image get scaled? Generally if you scale it, you know the size beforehand.

Note that scaling at runtime is different than resizing at load time, if that's what you really mean.

Share this post


Link to post
Share on other sites
I think what he's saying is that when he applies the sprite as a texture to a quad it gets scaled because it is close to the camera and the projection gets larger then the original resolution. Think changing the camera to Orthographic projection will do the trick. Don't know how to actually do it though.

Share this post


Link to post
Share on other sites
actually it sounds like he's saying if he loads an image, but puts in a different texture size (automatically scaling it), can he get the original dimensions back, in which case no. If I'm wrong about your question, I apologize.

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!