aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/main.c b/main.c
index a1b6337..9627cb5 100644
--- a/main.c
+++ b/main.c
@@ -14,15 +14,23 @@ int main() {
return 0;
}
- setup_registry(&state);
- setup_seat(&state);
- setup_surface(&state);
+ // set up globals
+ setup_registry_and_globals(&state);
+ wl_display_roundtrip(state.display);
+ // create non global objects
+ create_surface(&state);
+
+ // roundtrip to recieve the rest of the events
+ wl_display_roundtrip(state.display);
+
+ // set up graphics
if (!init_gl(&state)) {
fprintf(stderr, "Failed to Initalize EGL/OpenGL\n");
return 1;
}
+ // event loop
while (state.running) {
wl_display_dispatch_pending(state.display);
render_frame(&state);