Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pointer">
 /// </param>
 internal unsafe void MarshalTo(SharpVk.Interop.Khronos.FenceGetWin32HandleInfo *pointer)
 {
     pointer->SType      = StructureType.FenceGetWin32HandleInfo;
     pointer->Next       = null;
     pointer->Fence      = this.Fence?.handle ?? default(SharpVk.Interop.Fence);
     pointer->HandleType = this.HandleType;
 }
 /// <summary>
 ///
 /// </summary>
 public static unsafe IntPtr GetFenceWin32Handle(this SharpVk.Device extendedHandle, SharpVk.Khronos.FenceGetWin32HandleInfo getWin32HandleInfo)
 {
     try
     {
         IntPtr       result       = default(IntPtr);
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Khronos.FenceGetWin32HandleInfo *marshalledGetWin32HandleInfo = default(SharpVk.Interop.Khronos.FenceGetWin32HandleInfo *);
         IntPtr marshalledHandle = default(IntPtr);
         commandCache = extendedHandle.commandCache;
         marshalledGetWin32HandleInfo = (SharpVk.Interop.Khronos.FenceGetWin32HandleInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.FenceGetWin32HandleInfo>());
         getWin32HandleInfo.MarshalTo(marshalledGetWin32HandleInfo);
         SharpVk.Interop.Khronos.VkDeviceGetFenceWin32HandleDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.VkDeviceGetFenceWin32HandleDelegate>("vkGetFenceWin32HandleKHR", "instance");
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledGetWin32HandleInfo, &marshalledHandle);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = marshalledHandle;
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }