xxx
This commit is contained in:
4
main.sx
4
main.sx
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user