[client] wayland: implement window creation for egl

This commit implements window creation and resize logic, allowing the desktop
to be drawn.
This commit is contained in:
Quantum
2021-01-26 18:59:10 -05:00
committed by Geoffrey McRae
parent f4c1927f56
commit 9f0b99dac0
8 changed files with 248 additions and 54 deletions

View File

@@ -164,13 +164,6 @@ void egl_setup(void)
bool egl_create(void ** opaque, const LG_RendererParams params)
{
// Fail if running on Wayland so that OpenGL is used instead. Wayland-EGL
// is broken (https://github.com/gnif/LookingGlass/issues/306) and isn't
// fixable until SDL is dropped entirely. Until then, the OpenGL renderer
// "mostly works".
if (getenv("WAYLAND_DISPLAY"))
return false;
// check if EGL is even available
if (!eglQueryString(EGL_NO_DISPLAY, EGL_VERSION))
return false;
@@ -707,7 +700,7 @@ bool egl_render(void * opaque, LG_RendererRotate rotate)
}
egl_fps_render(this->fps, this->screenScaleX, this->screenScaleY);
eglSwapBuffers(this->display, this->surface);
app_eglSwapBuffers(this->display, this->surface);
return true;
}