Ejemplo n.º 1
0
 public static extern void vkCmdBlitImage(SharpVk.Interop.CommandBuffer commandBuffer, SharpVk.Interop.Image sourceImage, SharpVk.ImageLayout sourceImageLayout, SharpVk.Interop.Image destinationImage, SharpVk.ImageLayout destinationImageLayout, uint regionCount, SharpVk.Interop.ImageBlit *regions, SharpVk.Filter filter);
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 public unsafe void BlitImage(SharpVk.Image sourceImage, SharpVk.ImageLayout sourceImageLayout, SharpVk.Image destinationImage, SharpVk.ImageLayout destinationImageLayout, SharpVk.ImageBlit[] regions, SharpVk.Filter filter)
 {
     try
     {
         SharpVk.Interop.ImageBlit *marshalledRegions = default(SharpVk.Interop.ImageBlit *);
         if (regions != null)
         {
             var fieldPointer = (SharpVk.Interop.ImageBlit *)(Interop.HeapUtil.AllocateAndClear <SharpVk.Interop.ImageBlit>(regions.Length).ToPointer());
             for (int index = 0; index < (uint)(regions.Length); index++)
             {
                 regions[index].MarshalTo(&fieldPointer[index]);
             }
             marshalledRegions = fieldPointer;
         }
         else
         {
             marshalledRegions = null;
         }
         Interop.Commands.vkCmdBlitImage(this.handle, sourceImage?.handle ?? default(SharpVk.Interop.Image), sourceImageLayout, destinationImage?.handle ?? default(SharpVk.Interop.Image), destinationImageLayout, (uint)(regions?.Length ?? 0), marshalledRegions, filter);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }