public Texture3D(int width, int height, int depth, GraphicsFormat format, TextureCreationFlags flags, int mipCount) { bool flag = !base.ValidateFormat(format, FormatUsage.Sample); if (!flag) { Texture3D.ValidateIsNotCrunched(flags); Texture3D.Internal_Create(this, width, height, depth, mipCount, format, flags, IntPtr.Zero); } }
public Texture3D(int width, int height, int depth, TextureFormat textureFormat, int mipCount, IntPtr nativeTex) { bool flag = !base.ValidateFormat(textureFormat); if (!flag) { GraphicsFormat graphicsFormat = GraphicsFormatUtility.GetGraphicsFormat(textureFormat, false); TextureCreationFlags textureCreationFlags = (mipCount != 1) ? TextureCreationFlags.MipChain : TextureCreationFlags.None; bool flag2 = GraphicsFormatUtility.IsCrunchFormat(textureFormat); if (flag2) { textureCreationFlags |= TextureCreationFlags.Crunch; } Texture3D.ValidateIsNotCrunched(textureCreationFlags); Texture3D.Internal_Create(this, width, height, depth, mipCount, graphicsFormat, textureCreationFlags, nativeTex); } }