//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;
Managed DirectX - TextureLoader.FromFile auto-scales?
Im trying to load a huge texture (4096x4096) but when i load it like so:
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]
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.
If you want to load textures this size, try loading them into memory as a surface and then slicing them into smaller textures.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement