blob: a1b6337f25b034d31d5ed40d493b76d63f55668d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <stdio.h>
#include "state.h"
#include "wayland.h"
#include "graphics.h"
int main() {
client_state state = {0};
state.running = true;
state.display = wl_display_connect(NULL);
if (!state.display) {
fprintf(stderr, "Failed to Connect to wayland display\n");
return 0;
}
setup_registry(&state);
setup_seat(&state);
setup_surface(&state);
if (!init_gl(&state)) {
fprintf(stderr, "Failed to Initalize EGL/OpenGL\n");
return 1;
}
while (state.running) {
wl_display_dispatch_pending(state.display);
render_frame(&state);
}
}
|