Unfinished Wayland PR #1

Merged
IoI_xD merged 55 commits from IoI_xD/milsko:wayland into master 2025-12-10 11:11:02 +09:00
Showing only changes of commit b441f236b4 - Show all commits

have children swap buffers on the playground

IoIxD 2025-12-07 19:12:59 -07:00

View file

@ -828,11 +828,10 @@ static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) {
} }
static void MwLLBeginDrawImpl(MwLL handle) { static void MwLLBeginDrawImpl(MwLL handle) {
if(handle->wayland.parent == NULL) if(!eglMakeCurrent(handle->wayland.egl_display, handle->wayland.egl_surface, handle->wayland.egl_surface, handle->wayland.egl_context)) {
if(!eglMakeCurrent(handle->wayland.egl_display, handle->wayland.egl_surface, handle->wayland.egl_surface, handle->wayland.egl_context)) { printf("ERROR: eglMakeCurrent, %0X\n", eglGetError());
printf("ERROR: eglMakeCurrent, %0X\n", eglGetError()); return;
return; }
}
} }
static void MwLLEndDrawImpl(MwLL handle) { static void MwLLEndDrawImpl(MwLL handle) {
@ -869,12 +868,11 @@ static void MwLLEndDrawImpl(MwLL handle) {
wl_surface_damage(handle->wayland.surface, 0, 0, handle->wayland.ww, handle->wayland.wh); wl_surface_damage(handle->wayland.surface, 0, 0, handle->wayland.ww, handle->wayland.wh);
if(handle->wayland.parent == NULL) if(!eglSwapBuffers(handle->wayland.egl_display, handle->wayland.egl_surface)) {
if(!eglSwapBuffers(handle->wayland.egl_display, handle->wayland.egl_surface)) { printf("error swapping buffers! %0X\n", eglGetError());
printf("error swapping buffers! %0X\n", eglGetError()); } else {
} else { wl_surface_commit(handle->wayland.surface);
wl_surface_commit(handle->wayland.surface); }
}
} }
static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {