mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-06 13:29:45 -05:00
Fixed hotplugging + make EGL more chatty.
This commit is contained in:
parent
4285b0c218
commit
7e9feb70a0
4 changed files with 43 additions and 26 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <GLES3/gl3.h>
|
||||
#include <gbm.h> // GBM_FORMAT_XRGB8888
|
||||
|
||||
#include "backend/egl.h"
|
||||
|
|
@ -120,7 +121,8 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *display) {
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (eglInitialize(egl->display, NULL, NULL) == EGL_FALSE) {
|
||||
EGLint major, minor;
|
||||
if (eglInitialize(egl->display, &major, &minor) == EGL_FALSE) {
|
||||
wlr_log(L_ERROR, "Failed to initialize EGL: %s", egl_error());
|
||||
goto error;
|
||||
}
|
||||
|
|
@ -140,6 +142,13 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *display) {
|
|||
goto error;
|
||||
}
|
||||
|
||||
eglMakeCurrent(egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE, egl->context);
|
||||
wlr_log(L_INFO, "Using EGL %d.%d", (int)major, (int)minor);
|
||||
wlr_log(L_INFO, "Supported EGL extensions: %s", eglQueryString(egl->display,
|
||||
EGL_EXTENSIONS));
|
||||
wlr_log(L_INFO, "Using %s", glGetString(GL_VERSION));
|
||||
wlr_log(L_INFO, "Supported OpenGL ES extensions: %s", glGetString(GL_EXTENSIONS));
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue