Original Post
I am using C# and Managed DirectX. Is there a way to tell a texture how texture coordinates map across its surface? Consider the following: texture = TextureLoader.FromFile(dev, "eye.png", 0, 0, 1, 0, Format.Unknown, Pool.Default, Filter.Box, Filter.None, 0); SurfaceDescription sd = texture.GetLevelDescription(0); System.Console.Write("Height: {0}, Width: {1}", sd.Height, sd.Width); eye.png is an image with dimensions of around 600x500. The above code tells me that TextureLoader has given texture a size of 1024x512, which is to be expected. When I render this, the uv coordinate (1.0, 1.0) maps to the far corner of the *image* of the eye (texel 600x500) and not at the far corner of the *texture* (texel 1024x512). Now consider: destTexture = new Texture(dev, 1024, 512, 1, Usage.RenderTarget, Format.X8R8G8B8, Pool.Default); In this case the uv coordinate (1.0, 1.0) will always map to the far corner of the *texture* (texel 1024x512). Given that the images I intend to put in destTexture are not of this size exactly, I would like to be able to change this mapping in the clean way that TextureLoader seems to do. Does anybody know how TextureLoader is changing this mapping, and how I can do it for textures I create myself? Thanks, r.