/// <summary>
 ///
 /// </summary>
 public static unsafe uint AcquireNextImage2(this SharpVk.Device extendedHandle, SharpVk.Khronos.Experimental.AcquireNextImageInfo acquireInfo)
 {
     try
     {
         uint         result       = default(uint);
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Khronos.Experimental.AcquireNextImageInfo *marshalledAcquireInfo = default(SharpVk.Interop.Khronos.Experimental.AcquireNextImageInfo *);
         uint marshalledImageIndex = default(uint);
         commandCache          = extendedHandle.commandCache;
         marshalledAcquireInfo = (SharpVk.Interop.Khronos.Experimental.AcquireNextImageInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.Experimental.AcquireNextImageInfo>());
         acquireInfo.MarshalTo(marshalledAcquireInfo);
         SharpVk.Interop.Khronos.Experimental.VkDeviceAcquireNextImage2Delegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.Experimental.VkDeviceAcquireNextImage2Delegate>("vkAcquireNextImage2KHX", "instance");
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledAcquireInfo, &marshalledImageIndex);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = marshalledImageIndex;
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 internal unsafe void MarshalTo(SharpVk.Interop.Khronos.Experimental.AcquireNextImageInfo *pointer)
 {
     pointer->SType      = StructureType.AcquireNextImageInfo;
     pointer->Next       = null;
     pointer->Swapchain  = this.Swapchain?.handle ?? default(SharpVk.Interop.Khronos.Swapchain);
     pointer->Timeout    = this.Timeout;
     pointer->Semaphore  = this.Semaphore?.handle ?? default(SharpVk.Interop.Semaphore);
     pointer->Fence      = this.Fence?.handle ?? default(SharpVk.Interop.Fence);
     pointer->DeviceMask = this.DeviceMask;
 }