skip Posted July 7, 2005 Posted July 7, 2005 I am simply trying to load in a texture and have the mip maps be auto generated or force the generation of the mip maps through Texture.GenerateMipSubLevels(). I am getting very strange results. This bit of code generates multiple levels. Texture srcTexture = new Texture(Device, 256, 256, 0, 0, Format.X8R8G8B8, Pool.Managed); srcTexture.LevelCount = 9 at this point, so it did create multiple surfaces. Changing the Usage only creates one level. Texture srcTexture = new Texture(Device, 256, 256, 0, Usage.AutoGenerateMipMap, Format.X8R8G8B8, Pool.Managed); srcTexture.LevelCount is 1. I tried calling srcTexture.AutoGenerateFilterType = TextureFilter.Linear; srcTexture.GenerateMipSubLevels() but no effect either. Does anyone know what the problem is, am I using the GenerateMipSubLevels incorrectly? Quote
DrunkenHyena Posted July 15, 2005 Posted July 15, 2005 An application can discover support for automatic generation of mipmaps in a particular format by calling Manager.CheckDeviceFormat with Usage.AutoGenerateMipMap. If Manager.CheckDeviceFormat returns false, the Texture constructor succeeds, but returns a single-level texture. Documentation is cool. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.