/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The CommandBuffer handle to extend. /// </param> public static unsafe void BeginConditionalRendering(this SharpVk.CommandBuffer extendedHandle, SharpVk.Buffer buffer, ulong offset, SharpVk.Multivendor.ConditionalRenderingFlags?flags = default(SharpVk.Multivendor.ConditionalRenderingFlags?)) { try { CommandCache commandCache = default(CommandCache); SharpVk.Interop.Multivendor.ConditionalRenderingBeginInfo *marshalledConditionalRenderingBegin = default(SharpVk.Interop.Multivendor.ConditionalRenderingBeginInfo *); void *nextPointer = default(void *); commandCache = extendedHandle.commandCache; marshalledConditionalRenderingBegin = (SharpVk.Interop.Multivendor.ConditionalRenderingBeginInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Multivendor.ConditionalRenderingBeginInfo>()); marshalledConditionalRenderingBegin->SType = StructureType.ConditionalRenderingBeginInfo; marshalledConditionalRenderingBegin->Next = nextPointer; marshalledConditionalRenderingBegin->Buffer = buffer?.handle ?? default(SharpVk.Interop.Buffer); marshalledConditionalRenderingBegin->Offset = offset; if (flags != null) { marshalledConditionalRenderingBegin->Flags = flags.Value; } else { marshalledConditionalRenderingBegin->Flags = default(SharpVk.Multivendor.ConditionalRenderingFlags); } SharpVk.Interop.Multivendor.VkCommandBufferBeginConditionalRenderingDelegate commandDelegate = commandCache.Cache.vkCmdBeginConditionalRenderingEXT; commandDelegate(extendedHandle.handle, marshalledConditionalRenderingBegin); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> internal unsafe void MarshalTo(SharpVk.Interop.Multivendor.ConditionalRenderingBeginInfo *pointer) { pointer->SType = StructureType.ConditionalRenderingBeginInfo; pointer->Next = null; pointer->Buffer = this.Buffer?.handle ?? default(SharpVk.Interop.Buffer); pointer->Offset = this.Offset; if (this.Flags != null) { pointer->Flags = this.Flags.Value; } else { pointer->Flags = default(SharpVk.Multivendor.ConditionalRenderingFlags); } }