using dirty bits for poll-based frame events
This commit is contained in:
parent
33ceed2d22
commit
3311810666
3 changed files with 94 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue