Draw background right away

This commit is contained in:
Jared Miller 2025-12-16 11:16:38 -05:00
parent 3f9e33feaf
commit 1782bc8db7

View file

@ -179,6 +179,11 @@ pub fn main() !void {
rl.initWindow(@intCast(SCREEN_WIDTH), @intCast(SCREEN_HEIGHT), "lofivor sandbox");
defer rl.closeWindow();
// show background immediately (avoid black screen during init)
rl.beginDrawing();
rl.clearBackground(BG_COLOR);
rl.endDrawing();
// use larger batch buffer: 16384 elements vs default 8192
// fewer flushes = less driver overhead per frame
const numElements: i32 = 8192 * 4; // quads = 4 verts