b2dCls

Clears the back buffer to the current cls colour and begins a new frame.

2D Overlay

Parameters & Returns

Parameters

This function takes no parameters.

Returns

Void

Quick Summary

Clears the back buffer to the current cls colour and begins a new frame.

Technical Exegesis...

Starts a fresh frame: clears the render target (colour set with b2dSetClsColor) and the depth buffer, and prepares the command list for this frame's draw calls. Call it at the top of each frame before drawing, paired with b2dFlip at the end.

Example

Example.bam
b2dCls()
b2dDrawText("Hello", 10, 10, False, font)
b2dFlip()