• Advertisement
Sign in to follow this  

Managed DirectX - TextureLoader.FromFile auto-scales?

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

Im trying to load a huge texture (4096x4096) but when i load it like so:
//Load the texture into a temp storage
Microsoft.DirectX.Direct3D.Texture tempTexture = Microsoft.DirectX.Direct3D.TextureLoader.FromFile(device.mDevice, fn);

int widthDelta = tempTexture.GetSurfaceLevel(0).Description.Width - caps.MaxTextureWidth;
int heightDelta = tempTexture.GetSurfaceLevel(0).Description.Height -  caps.MaxTextureHeight;



tempTexture.GetSurfaceLevel(0).Description.Width is 2048 ( down from 4096) and the same goes for the height... Why is it autoscaling? Am i wrong? And if im right, how do i stop it! Regards. Ash. [Edited by - Asheh on December 29, 2004 6:24:51 PM]

Share this post


Link to post
Share on other sites
Advertisement
Yes, it will do that if your video card does not support the target scale as a target size. It will do the same if your card does not support oddly-sized textures and you try to load one of those.

If you want to load textures this size, try loading them into memory as a surface and then slicing them into smaller textures.

Share this post


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

  • Advertisement