/// <summary> /// /// </summary> internal unsafe void MarshalTo(SharpVk.Interop.Multivendor.DebugUtilsObjectNameInfo *pointer) { pointer->SType = StructureType.DebugUtilsObjectNameInfo; pointer->Next = null; pointer->ObjectType = this.ObjectType; pointer->ObjectHandle = this.ObjectHandle; pointer->ObjectName = Interop.HeapUtil.MarshalTo(this.ObjectName); }
/// <summary> /// /// </summary> internal static unsafe DebugUtilsObjectNameInfo MarshalFrom(SharpVk.Interop.Multivendor.DebugUtilsObjectNameInfo *pointer) { DebugUtilsObjectNameInfo result = default(DebugUtilsObjectNameInfo); result.ObjectType = pointer->ObjectType; result.ObjectHandle = pointer->ObjectHandle; result.ObjectName = Interop.HeapUtil.MarshalStringFrom(pointer->ObjectName); return(result); }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The Device handle to extend. /// </param> /// <param name="nameInfo"> /// </param> public static unsafe void SetDebugUtilsObjectName(this SharpVk.Device extendedHandle, SharpVk.Multivendor.DebugUtilsObjectNameInfo nameInfo) { try { CommandCache commandCache = default(CommandCache); SharpVk.Interop.Multivendor.DebugUtilsObjectNameInfo *marshalledNameInfo = default(SharpVk.Interop.Multivendor.DebugUtilsObjectNameInfo *); commandCache = extendedHandle.commandCache; marshalledNameInfo = (SharpVk.Interop.Multivendor.DebugUtilsObjectNameInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Multivendor.DebugUtilsObjectNameInfo>()); nameInfo.MarshalTo(marshalledNameInfo); SharpVk.Interop.Multivendor.VkDeviceSetDebugUtilsObjectNameDelegate commandDelegate = commandCache.Cache.vkSetDebugUtilsObjectNameEXT; Result methodResult = commandDelegate(extendedHandle.handle, marshalledNameInfo); if (SharpVkException.IsError(methodResult)) { throw SharpVkException.Create(methodResult); } } finally { Interop.HeapUtil.FreeAll(); } }