using dirty bits for poll-based frame events

This commit is contained in:
Rakarake 2026-01-22 23:40:06 +01:00
parent 33ceed2d22
commit 3311810666
3 changed files with 94 additions and 9 deletions

View file

@ -60,9 +60,9 @@ int main(int argc, char *argv[]) {
while (running) {
double time = time_since_start();
struct event event;
wait_for_event(&state, &event);
struct event event = wait_for_event(&state);
if (event.type == EVENT_DRAW) {
printf("drawing!!!!\n");
int width = event.data.draw.width;
int height = event.data.draw.height;
render(&renderer, width, height, time, shader_path, 0);