SetAutoFrame
Enable or disable auto-frame mode for the current coroutine.
Syntax
Susano.SetAutoFrame(enabled) -> void
Parameters
enabled (boolean): true to enable, false to disable auto-frame mode.
Return(s)
None
Behavior
When auto-frame is enabled, draw commands are automatically presented each game frame without needing BeginFrame()/SubmitFrame(). The build buffer is swapped to the render buffer and cleared every present. This is simpler for scripts that redraw every tick. BeginFrame()/SubmitFrame() still works normally even with auto-frame enabled.
Example(s)
Susano.SetAutoFrame(true)
-- No BeginFrame/SubmitFrame needed
Susano.DrawRectFilled(100, 100, 200, 50, 255, 0, 0)