Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="extendedHandle">
 /// The Device handle to extend.
 /// </param>
 public static unsafe SharpVk.RenderPass CreateRenderPass2(this SharpVk.Device extendedHandle, SharpVk.Khronos.RenderPassCreateInfo2 createInfo, SharpVk.AllocationCallbacks?allocator = default(SharpVk.AllocationCallbacks?))
 {
     try
     {
         SharpVk.RenderPass result       = default(SharpVk.RenderPass);
         CommandCache       commandCache = default(CommandCache);
         SharpVk.Interop.Khronos.RenderPassCreateInfo2 *marshalledCreateInfo = default(SharpVk.Interop.Khronos.RenderPassCreateInfo2 *);
         SharpVk.Interop.AllocationCallbacks *          marshalledAllocator  = default(SharpVk.Interop.AllocationCallbacks *);
         SharpVk.Interop.RenderPass marshalledRenderPass = default(SharpVk.Interop.RenderPass);
         commandCache         = extendedHandle.commandCache;
         marshalledCreateInfo = (SharpVk.Interop.Khronos.RenderPassCreateInfo2 *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.RenderPassCreateInfo2>());
         createInfo.MarshalTo(marshalledCreateInfo);
         if (allocator != null)
         {
             marshalledAllocator = (SharpVk.Interop.AllocationCallbacks *)(Interop.HeapUtil.Allocate <SharpVk.Interop.AllocationCallbacks>());
             allocator.Value.MarshalTo(marshalledAllocator);
         }
         else
         {
             marshalledAllocator = default(SharpVk.Interop.AllocationCallbacks *);
         }
         SharpVk.Interop.Khronos.VkDeviceCreateRenderPass2Delegate commandDelegate = commandCache.Cache.vkCreateRenderPass2KHR;
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledCreateInfo, marshalledAllocator, &marshalledRenderPass);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = new SharpVk.RenderPass(extendedHandle, marshalledRenderPass);
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Esempio n. 2
0
 internal RenderPass(SharpVk.Device parent, SharpVk.Interop.RenderPass handle)
 {
     this.handle       = handle;
     this.parent       = parent;
     this.commandCache = parent.commandCache;
 }
Esempio n. 3
0
 public static extern void vkGetRenderAreaGranularity(SharpVk.Interop.Device device, SharpVk.Interop.RenderPass renderPass, SharpVk.Extent2D *granularity);
Esempio n. 4
0
 public static extern void vkDestroyRenderPass(SharpVk.Interop.Device device, SharpVk.Interop.RenderPass renderPass, SharpVk.Interop.AllocationCallbacks *allocator);