Class VulkanImageFormatProperties
java.lang.Object
com.io7m.jcoronado.api.VulkanImageFormatProperties
- All Implemented Interfaces:
VulkanImageFormatPropertiesType
public final class VulkanImageFormatProperties
extends Object
implements VulkanImageFormatPropertiesType
Structure specifying image format properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanImageFormatProperties. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanImageFormatProperties.static VulkanImageFormatPropertiescopyOf(VulkanImageFormatPropertiesType instance) Creates an immutable copy of aVulkanImageFormatPropertiesTypevalue.booleanThis instance is equal to all instances ofVulkanImageFormatPropertiesthat have equal attribute values.inthashCode()Computes a hash code from attributes:maxExtent,maxMipLevels,maxArrayLayers,sampleCounts,maxResourceSize.intintlongstatic VulkanImageFormatPropertiesof(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, Iterable<VulkanSampleCountFlag> sampleCounts, long maxResourceSize) Construct a new immutableVulkanImageFormatPropertiesinstance.static VulkanImageFormatPropertiesof(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, Set<VulkanSampleCountFlag> sampleCounts, long maxResourceSize) Construct a new immutableVulkanImageFormatPropertiesinstance.toString()Prints the immutable valueVulkanImageFormatPropertieswith attribute values.withMaxArrayLayers(int value) Copy the current immutable object by setting a value for themaxArrayLayersattribute.withMaxExtent(VulkanExtent3D value) Copy the current immutable object by setting a value for themaxExtentattribute.withMaxMipLevels(int value) Copy the current immutable object by setting a value for themaxMipLevelsattribute.withMaxResourceSize(long value) Copy the current immutable object by setting a value for themaxResourceSizeattribute.withSampleCounts(VulkanSampleCountFlag... elements) Copy the current immutable object with elements that replace the content ofsampleCounts.withSampleCounts(Iterable<VulkanSampleCountFlag> elements) Copy the current immutable object with elements that replace the content ofsampleCounts.
-
Method Details
-
maxExtent
- Specified by:
maxExtentin interfaceVulkanImageFormatPropertiesType- Returns:
- The maximum image dimensions.
-
maxMipLevels
public int maxMipLevels()- Specified by:
maxMipLevelsin interfaceVulkanImageFormatPropertiesType- Returns:
- The maximum number of mipmap levels.
-
maxArrayLayers
public int maxArrayLayers()- Specified by:
maxArrayLayersin interfaceVulkanImageFormatPropertiesType- Returns:
- The maximum number of array layers.
-
sampleCounts
- Specified by:
sampleCountsin interfaceVulkanImageFormatPropertiesType- Returns:
- A set of flags specifying all the supported sample counts for this image
-
maxResourceSize
public long maxResourceSize()- Specified by:
maxResourceSizein interfaceVulkanImageFormatPropertiesType- Returns:
- An upper bound on the total image size in bytes, inclusive of all image subresources.
-
withMaxExtent
Copy the current immutable object by setting a value for themaxExtentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxExtent- Returns:
- A modified copy of the
thisobject
-
withMaxMipLevels
Copy the current immutable object by setting a value for themaxMipLevelsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxMipLevels- Returns:
- A modified copy of the
thisobject
-
withMaxArrayLayers
Copy the current immutable object by setting a value for themaxArrayLayersattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxArrayLayers- Returns:
- A modified copy of the
thisobject
-
withSampleCounts
Copy the current immutable object with elements that replace the content ofsampleCounts.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSampleCounts
Copy the current immutable object with elements that replace the content ofsampleCounts. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sampleCounts elements to set- Returns:
- A modified copy of
thisobject
-
withMaxResourceSize
Copy the current immutable object by setting a value for themaxResourceSizeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxResourceSize- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanImageFormatProperties of(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, Set<VulkanSampleCountFlag> sampleCounts, long maxResourceSize) Construct a new immutableVulkanImageFormatPropertiesinstance.- Parameters:
maxExtent- The value for themaxExtentattributemaxMipLevels- The value for themaxMipLevelsattributemaxArrayLayers- The value for themaxArrayLayersattributesampleCounts- The value for thesampleCountsattributemaxResourceSize- The value for themaxResourceSizeattribute- Returns:
- An immutable VulkanImageFormatProperties instance
-
of
public static VulkanImageFormatProperties of(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, Iterable<VulkanSampleCountFlag> sampleCounts, long maxResourceSize) Construct a new immutableVulkanImageFormatPropertiesinstance.- Parameters:
maxExtent- The value for themaxExtentattributemaxMipLevels- The value for themaxMipLevelsattributemaxArrayLayers- The value for themaxArrayLayersattributesampleCounts- The value for thesampleCountsattributemaxResourceSize- The value for themaxResourceSizeattribute- Returns:
- An immutable VulkanImageFormatProperties instance
-
copyOf
Creates an immutable copy of aVulkanImageFormatPropertiesTypevalue. 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 VulkanImageFormatProperties instance
-
builder
Creates a builder forVulkanImageFormatProperties.VulkanImageFormatProperties.builder() .setMaxExtent(com.io7m.jcoronado.api.VulkanExtent3D) // requiredmaxExtent.setMaxMipLevels(int) // requiredmaxMipLevels.setMaxArrayLayers(int) // requiredmaxArrayLayers.addSampleCounts|addAllSampleCounts(com.io7m.jcoronado.api.VulkanSampleCountFlag) //sampleCountselements .setMaxResourceSize(long) // requiredmaxResourceSize.build();- Returns:
- A new VulkanImageFormatProperties builder
-