/// <summary> /// /// </summary> internal unsafe static DebugUtilsLabel MarshalFrom(SharpVk.Interop.Multivendor.DebugUtilsLabel *pointer) { DebugUtilsLabel result = default(DebugUtilsLabel); result.LabelName = Interop.HeapUtil.MarshalStringFrom(pointer->LabelName); result.Color = (pointer->Color[0], pointer->Color[1], pointer->Color[2], pointer->Color[3]); return(result); }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The CommandBuffer handle to extend. /// </param> public static unsafe void InsertDebugUtilsLabel(this SharpVk.CommandBuffer extendedHandle, SharpVk.Multivendor.DebugUtilsLabel labelInfo) { try { CommandCache commandCache = default(CommandCache); SharpVk.Interop.Multivendor.DebugUtilsLabel *marshalledLabelInfo = default(SharpVk.Interop.Multivendor.DebugUtilsLabel *); commandCache = extendedHandle.commandCache; marshalledLabelInfo = (SharpVk.Interop.Multivendor.DebugUtilsLabel *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Multivendor.DebugUtilsLabel>()); labelInfo.MarshalTo(marshalledLabelInfo); SharpVk.Interop.Multivendor.VkCommandBufferInsertDebugUtilsLabelDelegate commandDelegate = commandCache.Cache.vkCmdInsertDebugUtilsLabelEXT; commandDelegate(extendedHandle.handle, marshalledLabelInfo); } finally { Interop.HeapUtil.FreeAll(); } }