examples: request an EGL config
Client examples using wlr_egl would fail with EGL_BAD_CONFIG because they
need an EGL config. Set the config attribs to a non-NULL value to make
sure wlr_egl creates an EGL config.
Fixes: 037710b1d4
("render/egl: support config-less wlr_egl")
This commit is contained in:
parent
9714638f3b
commit
198560fc1f
|
@ -192,7 +192,8 @@ int main(int argc, char **argv) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
EGLint attribs[] = { EGL_NONE };
|
||||||
|
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
struct xdg_surface *xdg_surface =
|
struct xdg_surface *xdg_surface =
|
||||||
|
|
|
@ -157,7 +157,8 @@ int main(int argc, char **argv) {
|
||||||
input_inhibit_manager);
|
input_inhibit_manager);
|
||||||
assert(input_inhibitor);
|
assert(input_inhibitor);
|
||||||
|
|
||||||
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
EGLint attribs[] = { EGL_NONE };
|
||||||
|
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
assert(surface);
|
assert(surface);
|
||||||
|
|
|
@ -224,7 +224,8 @@ int main(int argc, char **argv) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
EGLint attribs[] = { EGL_NONE };
|
||||||
|
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
struct xdg_surface *xdg_surface =
|
struct xdg_surface *xdg_surface =
|
||||||
|
|
|
@ -211,7 +211,8 @@ int main(int argc, char **argv) {
|
||||||
wl_region_add(joint_region, 256, 256, 256, 256);
|
wl_region_add(joint_region, 256, 256, 256, 256);
|
||||||
regions[REGION_TYPE_JOINT] = joint_region;
|
regions[REGION_TYPE_JOINT] = joint_region;
|
||||||
|
|
||||||
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
EGLint attribs[] = { EGL_NONE };
|
||||||
|
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
struct xdg_surface *xdg_surface =
|
struct xdg_surface *xdg_surface =
|
||||||
|
|
|
@ -443,7 +443,8 @@ int main(int argc, char **argv) {
|
||||||
e->egl = calloc(1, sizeof(struct wlr_egl));
|
e->egl = calloc(1, sizeof(struct wlr_egl));
|
||||||
e->width = e->height = 512;
|
e->width = e->height = 512;
|
||||||
|
|
||||||
wlr_egl_init(e->egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
EGLint attribs[] = { EGL_NONE };
|
||||||
|
wlr_egl_init(e->egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
/* Create the surface and xdg_toplevels, and set listeners */
|
/* Create the surface and xdg_toplevels, and set listeners */
|
||||||
|
|
||||||
|
|
|
@ -363,8 +363,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
zwp_text_input_v3_add_listener(text_input, &text_input_listener, NULL);
|
zwp_text_input_v3_add_listener(text_input, &text_input_listener, NULL);
|
||||||
|
|
||||||
|
EGLint attribs[] = { EGL_NONE };
|
||||||
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
struct xdg_surface *xdg_surface =
|
struct xdg_surface *xdg_surface =
|
||||||
|
|
|
@ -218,7 +218,8 @@ int main(int argc, char **argv) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, NULL, 0);
|
EGLint attribs[] = { EGL_NONE };
|
||||||
|
wlr_egl_init(&egl, EGL_PLATFORM_WAYLAND_EXT, display, attribs, 0);
|
||||||
|
|
||||||
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
struct xdg_surface *xdg_surface =
|
struct xdg_surface *xdg_surface =
|
||||||
|
|
Loading…
Reference in New Issue