aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2023-05-18 14:10:28 +0200
committerAndre Weissflog <floooh@gmail.com>2023-05-18 14:10:28 +0200
commit1f383b67e8d04ef952c7820e798c6b1cc6a8b60a (patch)
tree1485152d72ba987cf0c82c73dcfebb983450783d
parent1eef04f44bd59553d7d9c095eac252e52f743ec1 (diff)
README.md: update sokol-gfx example code
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index f9bee629..9e2c6e7e 100644
--- a/README.md
+++ b/README.md
@@ -219,13 +219,13 @@ void init(void) {
.logger.func = slog_func,
});
pass_action = (sg_pass_action) {
- .colors[0] = { .action=SG_ACTION_CLEAR, .value={1.0f, 0.0f, 0.0f, 1.0f} }
+ .colors[0] = { .load_action=SG_LOADACTION_CLEAR, .clear_value={1.0f, 0.0f, 0.0f, 1.0f} }
};
}
void frame(void) {
- float g = pass_action.colors[0].value.g + 0.01f;
- pass_action.colors[0].value.g = (g > 1.0f) ? 0.0f : g;
+ float g = pass_action.colors[0].clear_value.g + 0.01f;
+ pass_action.colors[0].clear_value.g = (g > 1.0f) ? 0.0f : g;
sg_begin_default_pass(&pass_action, sapp_width(), sapp_height());
sg_end_pass();
sg_commit();