Libraries.Game.Graphics.Vulkan.VulkanUtilities Documentation

Inherits from: Libraries.Language.Object

Actions Documentation

AreValidationLayersSupported()

This action returns true if this platform has available validation layers for Vulkan, or false otherwise. Validation layers can be enabled to check for Vulkan errors and warnings, but they slow performance, so they typically should only be used while debugging.

Return

boolean: True if there are available validation layers to use, or false otherwise.

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)

ConvertToAPIVersionID(integer major, integer minor, integer patch)

This action converts a Vulkan API version number from traditional "major.minor.patch" format (e.g., "1.1.0") to a single integer code. This can be used anywhere that a Vulkan API version number is required, but for most uses it's highly recommended to use one of the Vulkan API constant values from the VulkanConstants class instead. The encoded version ID will be an integer where the major component is bit-shifted left 22 places, the minor component is shifted left 12 places, and the patch bits remain in-place.

Parameters

  • integer major
  • integer minor
  • integer patch

Return

integer:

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)

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()

GetRequiredDisplayExtensions(Libraries.Containers.Array<text> returnedExtensions)

This action finds any extensions that are required for Vulkan to render to the display on this platform. The found extensions will be added to the end of the provided array.

Parameters

  • Libraries.Containers.Array: An array of text to store results. The names of the found extensions will be added to the end of this array.

GetRequiredPlatformDeviceExtensions(Libraries.Containers.Array<text> returnedExtensions, boolean useValidationLayers)

This action finds any extensions that are required for VulkanDevices to operate on the current platform and adds them to the end of the provided array. The required extensions are different depending on whether or not validation layers will be used for a VulkanInstance. To get extensions for use with validation layers, the boolean value should be true. To get extensions for use without validation layers, the value should be false instead.

Parameters

  • Libraries.Containers.Array: An array of text to store results. The names of the found extensions will be added to the end of this array.
  • boolean useValidationLayers: True if the extensions are to be used with validation layers enabled, or false otherwise.

GetRequiredPlatformInstanceExtensions(Libraries.Containers.Array<text> returnedExtensions, boolean useValidationLayers)

This action finds any extensions that are required for Vulkan to operate on the current platform and adds them to the end of the provided array. The required extensions are different depending on whether or not validation layers will be used for a VulkanInstance. To get extensions for use with validation layers, the boolean value should be true. To get extensions for use without validation layers, the value should be false instead.

Parameters

  • Libraries.Containers.Array: An array of text to store results. The names of the found extensions will be added to the end of this array.
  • boolean useValidationLayers: True if the extensions are to be used with validation layers enabled, or false otherwise.

GetSupportedExtensions()

This action returns an array containing the names of all the extensions that are available on this platform.

Return

Libraries.Containers.Array: An array containing the names of all extensions available on this platform.

GetSupportedExtensions(Libraries.Containers.Array<text> returnedExtensions)

This action fetches all of the names of all the extensions that are available on this platform, and stores them inside the provided text array.

Parameters

GetSupportedLayers()

This action returns an array containing the names of all the layers that are available on this platform.

Return

Libraries.Containers.Array: An array containing the names of all layers available on this platform.

GetSupportedLayers(Libraries.Containers.Array<text> returnedLayers)

This action fetches all of the names of all the layers that are available on this platform, and adds them to the end of the provided text array.

Parameters

GetSupportedValidationLayers(Libraries.Containers.Array<text> resultLayers)

This action finds the optimal set of validation layers that are available on this system and adds them to the end of the provided text array.

Parameters

GetSupportedValidationLayers()

This action finds the optimal set of validation layers that are available on this system and returns them as names in an array.

Return

Libraries.Containers.Array:

ShaderTypeToVulkanShaderStage(integer shaderType)

This action converts a shader type from the ShaderConstants class to its corresponding Vulkan shader stage constant.

Parameters

  • integer shaderType

Return

integer:

VulkanShaderStageToShaderType(integer shaderStage)

This action converts a shader stage from the VulkanConstants to its corresponding type in the ShaderConstants.

Parameters

  • integer shaderStage

Return

integer: