Class VMAAllocationCreateInfo

    • Method Detail

      • memoryTypeBits

        public long memoryTypeBits()
        Specified by:
        memoryTypeBits in interface VMAAllocationCreateInfoType
        Returns:
        A bitmask containing one bit set for every memory type acceptable for this allocation.
      • withFlags

        public final VMAAllocationCreateInfo withFlags​(VMAAllocationCreateFlag... elements)
        Copy the current immutable object with elements that replace the content of flags.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withFlags

        public final VMAAllocationCreateInfo withFlags​(java.lang.Iterable<VMAAllocationCreateFlag> elements)
        Copy the current immutable object with elements that replace the content of flags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of flags elements to set
        Returns:
        A modified copy of this object
      • withUsage

        public final VMAAllocationCreateInfo withUsage​(VMAMemoryUsage value)
        Copy the current immutable object by setting a value for the usage attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for usage
        Returns:
        A modified copy of the this object
      • withRequiredFlags

        public final VMAAllocationCreateInfo withRequiredFlags​(java.lang.Iterable<VulkanMemoryPropertyFlag> elements)
        Copy the current immutable object with elements that replace the content of requiredFlags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of requiredFlags elements to set
        Returns:
        A modified copy of this object
      • withPreferredFlags

        public final VMAAllocationCreateInfo withPreferredFlags​(java.lang.Iterable<VulkanMemoryPropertyFlag> elements)
        Copy the current immutable object with elements that replace the content of preferredFlags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of preferredFlags elements to set
        Returns:
        A modified copy of this object
      • withMemoryTypeBits

        public final VMAAllocationCreateInfo withMemoryTypeBits​(long value)
        Copy the current immutable object by setting a value for the memoryTypeBits attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for memoryTypeBits
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of VMAAllocationCreateInfo that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: flags, usage, requiredFlags, preferredFlags, memoryTypeBits.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value VMAAllocationCreateInfo with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static VMAAllocationCreateInfo of​(java.util.Set<VMAAllocationCreateFlag> flags,
                                                 VMAMemoryUsage usage,
                                                 java.util.Set<VulkanMemoryPropertyFlag> requiredFlags,
                                                 java.util.Set<VulkanMemoryPropertyFlag> preferredFlags,
                                                 long memoryTypeBits)
        Construct a new immutable VMAAllocationCreateInfo instance.
        Parameters:
        flags - The value for the flags attribute
        usage - The value for the usage attribute
        requiredFlags - The value for the requiredFlags attribute
        preferredFlags - The value for the preferredFlags attribute
        memoryTypeBits - The value for the memoryTypeBits attribute
        Returns:
        An immutable VMAAllocationCreateInfo instance
      • of

        public static VMAAllocationCreateInfo of​(java.lang.Iterable<VMAAllocationCreateFlag> flags,
                                                 VMAMemoryUsage usage,
                                                 java.lang.Iterable<VulkanMemoryPropertyFlag> requiredFlags,
                                                 java.lang.Iterable<VulkanMemoryPropertyFlag> preferredFlags,
                                                 long memoryTypeBits)
        Construct a new immutable VMAAllocationCreateInfo instance.
        Parameters:
        flags - The value for the flags attribute
        usage - The value for the usage attribute
        requiredFlags - The value for the requiredFlags attribute
        preferredFlags - The value for the preferredFlags attribute
        memoryTypeBits - The value for the memoryTypeBits attribute
        Returns:
        An immutable VMAAllocationCreateInfo instance
      • copyOf

        public static VMAAllocationCreateInfo copyOf​(VMAAllocationCreateInfoType instance)
        Creates an immutable copy of a VMAAllocationCreateInfoType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable VMAAllocationCreateInfo instance