Class VulkanImageCreateInfo.Builder

  • Enclosing class:
    VulkanImageCreateInfo

    public static final class VulkanImageCreateInfo.Builder
    extends java.lang.Object
    Builds instances of type VulkanImageCreateInfo. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final VulkanImageCreateInfo.Builder from​(VulkanImageCreateInfoType instance)
        Fill a builder with attribute values from the provided VulkanImageCreateInfoType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • setFormat

        public final VulkanImageCreateInfo.Builder setFormat​(VulkanFormat format)
        Initializes the value for the format attribute.
        Parameters:
        format - The value for format
        Returns:
        this builder for use in a chained invocation
      • setMipLevels

        public final VulkanImageCreateInfo.Builder setMipLevels​(int mipLevels)
        Initializes the value for the mipLevels attribute.
        Parameters:
        mipLevels - The value for mipLevels
        Returns:
        this builder for use in a chained invocation
      • setArrayLayers

        public final VulkanImageCreateInfo.Builder setArrayLayers​(int arrayLayers)
        Initializes the value for the arrayLayers attribute.
        Parameters:
        arrayLayers - The value for arrayLayers
        Returns:
        this builder for use in a chained invocation
      • setUsage

        public final VulkanImageCreateInfo.Builder setUsage​(java.lang.Iterable<VulkanImageUsageFlag> elements)
        Sets or replaces all elements for usage set.
        Parameters:
        elements - An iterable of usage elements
        Returns:
        this builder for use in a chained invocation
      • addQueueFamilyIndices

        public final VulkanImageCreateInfo.Builder addQueueFamilyIndices​(int element)
        Adds one element to queueFamilyIndices list.
        Parameters:
        element - A queueFamilyIndices element
        Returns:
        this builder for use in a chained invocation
      • addQueueFamilyIndices

        public final VulkanImageCreateInfo.Builder addQueueFamilyIndices​(int... elements)
        Adds elements to queueFamilyIndices list.
        Parameters:
        elements - An array of queueFamilyIndices elements
        Returns:
        this builder for use in a chained invocation
      • setQueueFamilyIndices

        public final VulkanImageCreateInfo.Builder setQueueFamilyIndices​(java.lang.Iterable<java.lang.Integer> elements)
        Sets or replaces all elements for queueFamilyIndices list.
        Parameters:
        elements - An iterable of queueFamilyIndices elements
        Returns:
        this builder for use in a chained invocation
      • addAllQueueFamilyIndices

        public final VulkanImageCreateInfo.Builder addAllQueueFamilyIndices​(java.lang.Iterable<java.lang.Integer> elements)
        Adds elements to queueFamilyIndices list.
        Parameters:
        elements - An iterable of queueFamilyIndices elements
        Returns:
        this builder for use in a chained invocation
      • build

        public VulkanImageCreateInfo build()
        Builds a new VulkanImageCreateInfo.
        Returns:
        An immutable instance of VulkanImageCreateInfo
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing