SFML.Graphics.Texture.GenerateMipmap C# (CSharp) Method

GenerateMipmap() public method

Generate a mipmap using the current texture data

Mipmaps are pre-computed chains of optimized textures. Each level of texture in a mipmap is generated by halving each of the previous level's dimensions. This is done until the final level has the size of 1x1. The textures generated in this process may make use of more advanced filters which might improve the visual quality of textures when they are applied to objects much smaller than they are. This is known as minification. Because fewer texels (texture elements) have to be sampled from when heavily minified, usage of mipmaps can also improve rendering performance in certain scenarios.

Mipmap generation relies on the necessary OpenGL extension being available. If it is unavailable or generation fails due to another reason, this function will return false. Mipmap data is only valid from the time it is generated until the next time the base level image is modified, at which point this function will have to be called again to regenerate it.

public GenerateMipmap ( ) : bool
return bool
        public bool GenerateMipmap()
        {
            return sfTexture_generateMipmap(CPointer);
        }