GraphicsTimerSlot
Package: Libraries.Game.Graphics.Timing · Inherits from: Libraries.Language.Object
A GraphicsTimerSlot is a GraphicsTimer's record of one frame in flight: its pool of timestamps and, for each stamp written, the phase it belongs to and whether it starts or ends it. The timer has one slot per frame the GPU may be working on, so reading a frame's times never waits for another. Programs don't use it directly.
Example Code
use Libraries.Game.Graphics.Timing.GraphicsTimerSlot
GraphicsTimerSlot slot
output slot:GetStampCount()
Actions
AddStamp(text name, boolean isStart)
This action notes the next stamp: the phase it belongs to and whether it starts it. It returns the query the stamp is written to, or -1 if the pool is full.
Parameters
nametext: The phase's name ("" for the frame's start and end)isStartboolean: True if it starts the phase
Returns
integer: The query, from 0, or -1
GetFrameNumber()
Returns
integer
GetPool()
Returns
GetRoomLeft()
This action returns how many stamps are left in the pool.
Returns
integer: The count
GetStampCount()
This action returns how many stamps are left in the pool.
Returns
integer: The count
GetStampName(integer index)
This action notes the next stamp: the phase it belongs to and whether it starts it. It returns the query the stamp is written to, or -1 if the pool is full.
Parameters
indexinteger
Returns
text: The query, from 0, or -1
IsStampStart(integer index)
This action starts a new frame in the slot, forgetting the last one's stamps.
Parameters
indexinteger
Returns
boolean
IsWaiting()
Returns
boolean
SetPool(Libraries.Game.Graphics.Vulkan.VulkanQueryPool value)
Parameters
SetWaiting(boolean value)
Parameters
valueboolean
Start(integer frame)
This action starts a new frame in the slot, forgetting the last one's stamps.
Parameters
frameinteger: The frame's number