Pool blue clear screen

This commit is contained in:
nothke 2024-06-09 19:28:42 +02:00
parent 35890aded0
commit 7088c43ac2

View File

@ -8,9 +8,29 @@ const state = struct {
var pip: sg.Pipeline = .{}; var pip: sg.Pipeline = .{};
}; };
export fn frame() void {} var pass_action: sg.PassAction = .{};
export fn init() void {} export fn init() void {
sg.setup(.{
.logger = .{ .func = sokol.log.func },
.environment = sokol.glue.environment(),
});
pass_action.colors[0] = .{
.load_action = .CLEAR,
.clear_value = .{ .r = 0.2, .g = 1, .b = 1, .a = 1 },
};
std.debug.print("Backend: {}\n", .{sg.queryBackend()});
}
export fn frame() void {
//const g = pass_action.colors[0].clear_value.g + 0.01;
sg.beginPass(.{ .action = pass_action, .swapchain = sokol.glue.swapchain() });
sg.endPass();
sg.commit();
}
export fn cleanup() void {} export fn cleanup() void {}