예제 #1
0
        internal DescriptorPool(Device parent, ref DescriptorPoolCreateInfo createInfo, ref AllocationCallbacks?allocator)
        {
            Parent    = parent;
            Allocator = allocator;

            fixed(DescriptorPoolSize *poolSizesPtr = createInfo.PoolSizes)
            {
                createInfo.ToNative(out DescriptorPoolCreateInfo.Native nativeCreateInfo, poolSizesPtr);
                long   handle;
                Result result = vkCreateDescriptorPool(Parent, &nativeCreateInfo, NativeAllocator, &handle);

                VulkanException.ThrowForInvalidResult(result);
                Handle = handle;
            }
        }
예제 #2
0
 /// <summary>
 /// Creates a descriptor pool object.
 /// </summary>
 /// <param name="createInfo">
 /// The structure specifying the state of the descriptor pool object.
 /// </param>
 /// <param name="allocator">Controls host memory allocation.</param>
 /// <returns>The resulting descriptor pool object.</returns>
 /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
 public DescriptorPool CreateDescriptorPool(DescriptorPoolCreateInfo createInfo,
                                            AllocationCallbacks?allocator = null)
 {
     return(new DescriptorPool(this, ref createInfo, ref allocator));
 }