public static int SizeOfMarshalDirect(this VkRenderPassBeginInfo s) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } return (s.Next.SizeOfMarshalIndirect() + s.ClearValues.SizeOfMarshalDirect()); }
public static VkRenderPassBeginInfo.Raw *MarshalIndirect(this VkRenderPassBeginInfo s, ref byte *unmanaged) { if (s == null) { return((VkRenderPassBeginInfo.Raw *) 0); } var result = (VkRenderPassBeginInfo.Raw *)unmanaged; unmanaged += VkRenderPassBeginInfo.Raw.SizeInBytes; *result = s.MarshalDirect(ref unmanaged); return(result); }
public void CmdBeginRenderPass(VkRenderPassBeginInfo renderPassBegin, VkSubpassContents contents) { var unmanagedSize = renderPassBegin.SizeOfMarshalIndirect(); var unmanagedArray = new byte[unmanagedSize]; fixed(byte *unmanagedStart = unmanagedArray) { var unmanaged = unmanagedStart; var _commandBuffer = Handle; var _pRenderPassBegin = renderPassBegin.MarshalIndirect(ref unmanaged); var _contents = contents; Direct.CmdBeginRenderPass(_commandBuffer, _pRenderPassBegin, _contents); } }
public static VkRenderPassBeginInfo.Raw MarshalDirect(this VkRenderPassBeginInfo s, ref byte *unmanaged) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } var pNext = s.Next.MarshalIndirect(ref unmanaged); var pClearValues = s.ClearValues.MarshalDirect(ref unmanaged); VkRenderPassBeginInfo.Raw result; result.sType = VkStructureType.RenderPassBeginInfo; result.pNext = pNext; result.renderPass = s.RenderPass?.Handle ?? VkRenderPass.HandleType.Null; result.framebuffer = s.Framebuffer?.Handle ?? VkFramebuffer.HandleType.Null; result.renderArea = s.RenderArea; result.clearValueCount = s.ClearValues?.Count ?? 0; result.pClearValues = pClearValues; return(result); }
public static int SizeOfMarshalIndirect(this VkRenderPassBeginInfo s) => s == null ? 0 : s.SizeOfMarshalDirect() + VkRenderPassBeginInfo.Raw.SizeInBytes;
public void CmdBeginRenderPass(VkRenderPassBeginInfo renderPassBegin, VkSubpassContents contents) { var unmanagedSize = renderPassBegin.SizeOfMarshalIndirect(); var unmanagedArray = new byte[unmanagedSize]; fixed (byte* unmanagedStart = unmanagedArray) { var unmanaged = unmanagedStart; var _commandBuffer = Handle; var _pRenderPassBegin = renderPassBegin.MarshalIndirect(ref unmanaged); var _contents = contents; Direct.CmdBeginRenderPass(_commandBuffer, _pRenderPassBegin, _contents); } }