CSharpImageLibrary.DDS.DDSGeneral.GetMipOffset C# (CSharp) Method

GetMipOffset() static private method

static private GetMipOffset ( double mipIndex, ImageEngineFormat format, int baseWidth, int baseHeight ) : int
mipIndex double
format ImageEngineFormat
baseWidth int
baseHeight int
return int
        internal static int GetMipOffset(double mipIndex, ImageEngineFormat format, int baseWidth, int baseHeight)
        {
            // -1 because if we want the offset of the mip, it's the sum of all sizes before it NOT including itself.
            return GetCompressedSizeUpToIndex(mipIndex - 1, format, baseWidth, baseHeight);
        }