VulkanRetirable
Package: Libraries.Game.Graphics.Vulkan · Inherits from: Libraries.Language.Object
VulkanRetirable is the parent of Vulkan objects that can be handed to VulkanGraphics:Retire. Retire keeps such an object until every frame that might still be using it on the GPU has finished, then calls its Release action, which frees it.
Example Code
// In a class that made a buffer and now replaces it:
// VulkanGraphics graphics = cast(VulkanGraphics, gameState:GetGameGraphics())
// graphics:Retire(oldBuffer)
Actions
GetRetireFrame()
This action returns the frame number at which the object may be freed.
Returns
integer: The frame number.
Release()
This action frees the object's Vulkan resources. VulkanGraphics calls it once no frame on the GPU can still be using the object.
SetRetireFrame(integer frame)
This action sets the frame number at which the object may be freed.
Parameters
frameinteger: The frame number.