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

            createInfo.ToNative(out DescriptorSetLayoutCreateInfo.Native nativeCreateInfo);
            long   handle;
            Result result = vkCreateDescriptorSetLayout(Parent, &nativeCreateInfo, NativeAllocator, &handle);

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