/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The CommandBuffer handle to extend. /// </param> public static unsafe void BeginRenderPass2(this SharpVk.CommandBuffer extendedHandle, SharpVk.RenderPassBeginInfo renderPassBegin, SharpVk.SubpassContents contents) { try { CommandCache commandCache = default(CommandCache); SharpVk.Interop.RenderPassBeginInfo * marshalledRenderPassBegin = default(SharpVk.Interop.RenderPassBeginInfo *); SharpVk.Interop.Khronos.SubpassBeginInfo *marshalledSubpassBeginInfo = default(SharpVk.Interop.Khronos.SubpassBeginInfo *); void *nextPointer = default(void *); commandCache = extendedHandle.commandCache; marshalledRenderPassBegin = (SharpVk.Interop.RenderPassBeginInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.RenderPassBeginInfo>()); renderPassBegin.MarshalTo(marshalledRenderPassBegin); marshalledSubpassBeginInfo = (SharpVk.Interop.Khronos.SubpassBeginInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.SubpassBeginInfo>()); marshalledSubpassBeginInfo->SType = StructureType.SubpassBeginInfo; marshalledSubpassBeginInfo->Next = nextPointer; marshalledSubpassBeginInfo->Contents = contents; SharpVk.Interop.Khronos.VkCommandBufferBeginRenderPass2Delegate commandDelegate = commandCache.Cache.vkCmdBeginRenderPass2KHR; commandDelegate(extendedHandle.handle, marshalledRenderPassBegin, marshalledSubpassBeginInfo); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> internal unsafe void MarshalTo(SharpVk.Interop.Khronos.SubpassBeginInfo *pointer) { pointer->SType = StructureType.SubpassBeginInfo; pointer->Next = null; pointer->Contents = this.Contents; }