Skip to content

raylib.EndDrawing

JoeStrout edited this page Oct 23, 2026 · 4 revisions

End canvas (framebuffer) drawing and swap buffers (double buffering)

Parameters

None.

Return value

None.

Notes

Follow EndDrawing immediately with yield. On the web, input that arrives while your script is yielded is marked as old by the next EndDrawing, so an IsKeyPressed check placed between EndDrawing and yield never sees the key. See The Main Loop.

Example

raylib.InitWindow 800, 600, "EndDrawing"
while not raylib.WindowShouldClose
    raylib.BeginDrawing
    raylib.ClearBackground raylib.BLACK
    // ... draw stuff ...
    raylib.EndDrawing
    yield
end while
raylib.CloseWindow

Clone this wiki locally