public void CmdClearDepthStencilImage(Image image, ImageLayout imageLayout, ClearDepthStencilValue pDepthStencil, ImageSubresourceRange?pRange) { unsafe { ImageSubresourceRange valpRange = pRange ?? default(ImageSubresourceRange); ImageSubresourceRange *ptrpRange = pRange != null ? &valpRange : (ImageSubresourceRange *)IntPtr.Zero; Interop.NativeMethods.vkCmdClearDepthStencilImage(this.m, image != null ? image.m : default(UInt64), imageLayout, &pDepthStencil, (UInt32)(pRange != null ? 1 : 0), ptrpRange); } }
public void CmdClearDepthStencilImage(Image image, ImageLayout imageLayout, ClearDepthStencilValue pDepthStencil, ImageSubresourceRange[] pRanges) { unsafe { var arraypRanges = pRanges == null ? IntPtr.Zero : Marshal.AllocHGlobal(pRanges.Length * sizeof(ImageSubresourceRange)); var lenpRanges = pRanges == null ? 0 : pRanges.Length; if (pRanges != null) { for (int i = 0; i < pRanges.Length; i++) { ((ImageSubresourceRange *)arraypRanges) [i] = (pRanges [i]); } } Interop.NativeMethods.vkCmdClearDepthStencilImage(this.m, image != null ? image.m : default(UInt64), imageLayout, &pDepthStencil, (uint)lenpRanges, (ImageSubresourceRange *)arraypRanges); Marshal.FreeHGlobal(arraypRanges); } }
public ClearValue(ClearDepthStencilValue depthStencil) : this() { this.depthStencil = depthStencil; }