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.
srcTexture.LevelCount = 9 at this point, so it did create multiple surfaces.
Changing the Usage only creates one level.
srcTexture.LevelCount is 1. I tried calling
but no effect either.
Does anyone know what the problem is, am I using the GenerateMipSubLevels incorrectly?
This bit of code generates multiple levels.
Code:
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.
Code:
Texture srcTexture = new Texture(Device, 256, 256, 0, Usage.AutoGenerateMipMap, Format.X8R8G8B8, Pool.Managed);
srcTexture.LevelCount is 1. I tried calling
Code:
srcTexture.AutoGenerateFilterType = TextureFilter.Linear;
srcTexture.GenerateMipSubLevels()
but no effect either.
Does anyone know what the problem is, am I using the GenerateMipSubLevels incorrectly?