示例#1
0
        public Texture2DArray(int width, int height, int depth, GraphicsFormat format, TextureCreationFlags flags, int mipCount)
        {
            bool flag = !base.ValidateFormat(format, FormatUsage.Sample);

            if (!flag)
            {
                Texture2DArray.ValidateIsNotCrunched(flags);
                Texture2DArray.Internal_Create(this, width, height, depth, mipCount, format, flags);
            }
        }
示例#2
0
        public Texture2DArray(int width, int height, int depth, TextureFormat textureFormat, int mipCount, [DefaultValue("true")] bool linear)
        {
            bool flag = !base.ValidateFormat(textureFormat);

            if (!flag)
            {
                GraphicsFormat       graphicsFormat       = GraphicsFormatUtility.GetGraphicsFormat(textureFormat, !linear);
                TextureCreationFlags textureCreationFlags = (mipCount != 1) ? TextureCreationFlags.MipChain : TextureCreationFlags.None;
                bool flag2 = GraphicsFormatUtility.IsCrunchFormat(textureFormat);
                if (flag2)
                {
                    textureCreationFlags |= TextureCreationFlags.Crunch;
                }
                Texture2DArray.ValidateIsNotCrunched(textureCreationFlags);
                Texture2DArray.Internal_Create(this, width, height, depth, mipCount, graphicsFormat, textureCreationFlags);
            }
        }