When I create a texture using the code below the mip maps always come out as a solid color, how can i generate proper mip maps from the texture

TextureImage = new Texture(device, ii.Width, ii.Height, 5, Usage.None, format, Pool.Managed);

SurfaceLoader.FromSurface(TextureImage.GetSurfaceLevel(0), textureTexture.GetSurfaceLevel(0), Filter.None, 0);


Thanks for any help, -Dave

Re: Game Technologies: Graphics Generating MipMaps

Ralf Kornmann

You are a victim of a common misunderstanding what GenerateMipSubLevels do. It is only there to create the mip maps for textures that are used as render target. And even then they need to create with special parameters.

The function you are looking for is TextureLoader.FilterTexture.

Re: Game Technologies: Graphics Generating MipMaps


Thanks Ralf, will check it out.