Skip to content

Commit

Permalink
README.md: update sokol-gfx example code
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed May 18, 2023
1 parent 1eef04f commit 1f383b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1f383b6

Please sign in to comment.