WIP progress!
This commit is contained in:
parent
9cb10980e3
commit
53af3af200
2 changed files with 10 additions and 3 deletions
12
wayland.c
12
wayland.c
|
|
@ -299,10 +299,18 @@ void wayland_init(struct client_state *state, int output_type) {
|
||||||
|
|
||||||
/// Swaps front/backbuffers and dispatches pending wayland commands.
|
/// Swaps front/backbuffers and dispatches pending wayland commands.
|
||||||
void commit(struct client_state *state) {
|
void commit(struct client_state *state) {
|
||||||
wl_display_dispatch(state->wl_display);
|
|
||||||
struct surface_list *next = state->surface_list;
|
struct surface_list *next = state->surface_list;
|
||||||
while (next != NULL) {
|
while (next != NULL) {
|
||||||
// TODO maybe need to set current egl window or whatever
|
wl_display_dispatch(state->wl_display);
|
||||||
|
|
||||||
|
// TESTING maybe need to set current egl window or whatever
|
||||||
|
if (eglMakeCurrent(state->egl_display, next->data.egl_surface,
|
||||||
|
next->data.egl_surface, state->egl_context)) {
|
||||||
|
fprintf(stderr, "Made current\n");
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Made current failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
eglSwapBuffers(state->egl_display, next->data.egl_surface);
|
eglSwapBuffers(state->egl_display, next->data.egl_surface);
|
||||||
next = next->next;
|
next = next->next;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ struct surface_list {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct client_state {
|
struct client_state {
|
||||||
// TODO: move this to surface
|
|
||||||
int width, height;
|
int width, height;
|
||||||
int running;
|
int running;
|
||||||
int output_type;
|
int output_type;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue