This commit is contained in:
agra
2026-02-24 19:30:54 +02:00
parent 6b4d7fbc54
commit 812bc6d6ec
2 changed files with 3 additions and 2 deletions

View File

@@ -9,8 +9,8 @@ WIDTH :f32: 800;
HEIGHT :f32: 600;
save_snapshot :: (path: [:0]u8, w: s32, h: s32) {
stride : s64 = xx (w * 4);
buf_size : s64 = stride * xx h;
stride : s64 = w * 4;
buf_size : s64 = stride * h;
pixels : [*]u8 = xx context.allocator.alloc(buf_size);
glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);