> For the complete documentation index, see [llms.txt](https://osl.mistium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://osl.mistium.com/graphics-osl-window/rendering.md).

# Rendering

Rendering commands draw to the window opened by the [`osl/window`](/graphics-osl-window/window.md) package. They run inside the `mainloop:` block, which executes once per frame, so whatever you draw is redrawn every frame.

A program positions a **draw cursor**, sets a colour, then issues element commands (`square`, `icon`, `text`, `image`) relative to that cursor.

* [Basics](/graphics-osl-window/rendering/basics.md) - colours and the frame model.
* [Draw Cursor](/graphics-osl-window/rendering/draw-cursor.md) - moving the point that elements draw from.
* [Elements](/graphics-osl-window/rendering/elements.md) - the shapes and content you can draw.
