MonoGdx.Graphics.G2D.TextureContext.SurfaceFormatSize C# (CSharp) Method

SurfaceFormatSize() private static method

private static SurfaceFormatSize ( SurfaceFormat format ) : int
format SurfaceFormat
return int
        private static int SurfaceFormatSize(SurfaceFormat format)
        {
            switch (format) {
                case SurfaceFormat.Dxt1:
                case SurfaceFormat.Dxt1a:
                    return 4;
                case SurfaceFormat.Alpha8:
                case SurfaceFormat.Dxt3:
                case SurfaceFormat.Dxt5:
                    return 8 * 1;
                case SurfaceFormat.Bgr565:
                case SurfaceFormat.Bgra4444:
                case SurfaceFormat.Bgra5551:
                case SurfaceFormat.HalfSingle:
                case SurfaceFormat.NormalizedByte2:
                    return 8 * 2;
                case SurfaceFormat.Bgr32:
                case SurfaceFormat.Bgra32:
                case SurfaceFormat.Color:
                case SurfaceFormat.HalfVector2:
                case SurfaceFormat.NormalizedByte4:
                case SurfaceFormat.Rg32:
                case SurfaceFormat.Rgba1010102:
                case SurfaceFormat.Single:
                    return 8 * 4;
                case SurfaceFormat.HalfVector4:
                case SurfaceFormat.Rgba64:
                case SurfaceFormat.Vector2:
                case SurfaceFormat.HdrBlendable:
                    return 8 * 8;
                case SurfaceFormat.Vector4:
                    return 8 * 16;
                default:
                    return 1;
            }
        }