Libraries.Game.Graphics.Vulkan.VulkanImageInfo Documentation

This class represents the information needed to create a VulkanImage. Some fields are mandatory and must be set before use. The other fields have default values and can optionally be set for specific use cases, but can be ignored for basic uses. Mandatory fields: width: The width of the image. height: The height of the image. usage: How the image will be used, described by a combination of IMAGE_USAGE flags from VulkanConstants. Optional fields: imageType: An IMAGE_TYPE value from VulkanConstants. Defaults to IMAGE_TYPE_2D. depth: The depth of the image. Default value is 1, and this should only be changed if the imageType is IMAGE_TYPE_3D. mipLevels: The number of levels of detail available for minified sampling of the image (i.e., how many levels are available for mipmapping). The default value is 1 (no mipmapping). arrayLayers: The number of layers in the image. The default value is 1. format: The format of the texels (pixels in the image), using a FORMAT value from VulkanConstants. The default value is FORMAT_R8G8B8A8_UNORM (8 bits each of Red, Green, Blue, and Alpha values, as normalized between 0 and 1). tiling: The arrangement (or "tiling") of the internal data, using an IMAGE_TILING value from VulkanConstants. The default value is IMAGE_TILING_OPTIMAL. initialLayout: An IMAGE_LAYOUT value from VulkanConstants that describes the starting layout of all image subresources of this image. The default value is IMAGE_LAYOUT_UNDEFINED. samples: The number of samples per texel (pixel in the image), using a SAMPLE_COUNT value from VulkanConstants. The default value is SAMPLE_COUNT_1_BIT (no multisampling). sharingMode: A SHARING_MODE value from VulkanConstants describing how to handle multiple queue families accessing this image. The default value is SHARING_MODE_EXCLUSIVE. flags: A bitmask of additional flags during image creation, using IMAGE_CREATE constants. The default value is 0 (no flags). memoryUsage: A MEMORY_USAGE value from VulkanConstants describing how the image should be stored in memory. The default value is MEMORY_USAGE_AUTO, so the memory will be allocated to the best available type based on the "usage" flag. allocationFlags: A ALLOCATION_CREATE value from VulkanConstants describing details about the memory allocated for this image. The default value is 0. If the image needs to be mapped to host-accessible memory, then this should be set to ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. requiredMemoryFlags: When used in conjunction with preferredMemoryFlags, this indicates which flags for the allocation are required. The default value is 0. Most use cases can ignore this field. preferredMemoryFlags: When used in conjunction with requiredMemoryFlags, this indicates flags that we would like the system to respect, but can be ignored if they're not supported. The default value is 0. Most use cases can ignore this field.

Inherits from: Libraries.Language.Object

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetAllocationFlags()

Return

integer

GetArrayLayers()

Return

integer

GetDepth()

Return

integer

GetFlags()

Return

integer

GetFormat()

Return

integer

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetHeight()

Return

integer

GetImageType()

Return

integer

GetInitialLayout()

Return

integer

GetMemoryUsage()

Return

integer

GetMipLevels()

Return

integer

GetPreferredMemoryFlags()

Return

integer

GetRequiredMemoryFlags()

Return

integer

GetSamples()

Return

integer

GetSharingMode()

Return

integer

GetTiling()

Return

integer

GetUsage()

Return

integer

GetWidth()

Return

integer

SetAllocationFlags(integer allocationFlags)

Parameters

  • integer allocationFlags

SetArrayLayers(integer arrayLayers)

Parameters

  • integer arrayLayers

SetDepth(integer depth)

Parameters

  • integer depth

SetFlags(integer flags)

Parameters

  • integer flags

SetFormat(integer format)

Parameters

  • integer format

SetHeight(integer height)

Parameters

  • integer height

SetImageType(integer imageType)

Parameters

  • integer imageType

SetInitialLayout(integer initialLayout)

Parameters

  • integer initialLayout

SetMemoryUsage(integer memoryUsage)

Parameters

  • integer memoryUsage

SetMipLevels(integer mipLevels)

Parameters

  • integer mipLevels

SetPreferredMemoryFlags(integer preferredMemoryFlags)

Parameters

  • integer preferredMemoryFlags

SetRequiredMemoryFlags(integer requiredMemoryFlags)

Parameters

  • integer requiredMemoryFlags

SetSamples(integer samples)

Parameters

  • integer samples

SetSharingMode(integer sharingMode)

Parameters

  • integer sharingMode

SetTiling(integer tiling)

Parameters

  • integer tiling

SetUsage(integer usage)

Parameters

  • integer usage

SetWidth(integer width)

Parameters

  • integer width