BeginLabelCommand

Package: Libraries.Game.Graphics.Vulkan.Commands · Inherits from: Libraries.Game.Graphics.Vulkan.Commands.VulkanCommand, Libraries.Language.Object

The BeginLabelCommand starts a named, colored span of a command buffer (vkCmdBeginDebugUtilsLabelEXT); an EndLabelCommand ends it. Spans may nest. Graphics tools show the names: Xcode's GPU frame capture and Instruments' Metal System Trace (through MoltenVK), and RenderDoc. They do nothing unless Vulkan's debug extension, VK_EXT_debug_utils, is loaded, as it is with validation layers on, so they are always safe to record.

Example Code

use Libraries.Game.Graphics.Vulkan.Commands.BeginLabelCommand

BeginLabelCommand label
label:SetLabel("Shadows")
label:SetColor(0.2, 0.4, 0.9, 1)

Actions

GetAlpha()

Returns

number

GetBlue()

Returns

number

GetGreen()

This action sets the span's color in tools that show one, each part from 0 to 1.

Returns

number

GetLabel()

Returns

text

GetRed()

This action sets the span's color from a Color.

Returns

number

Record(Libraries.Game.Graphics.Vulkan.VulkanCommandBuffer buffer)

Parameters

SetColor(number red, number green, number blue, number alpha)

This action sets the span's color in tools that show one, each part from 0 to 1.

Parameters

  • red number
  • green number
  • blue number
  • alpha number

SetColor(Libraries.Game.Graphics.Color color)

This action sets the span's color from a Color.

Parameters

SetLabel(text value)

Parameters

  • value text

Inherited Actions

3 actions from Libraries.Language.Object