aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_renderer.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-04 13:37:36 +0100
committerIlia Bozhinov <ammen99@gmail.com>2020-12-07 11:40:45 +0100
commit037710b1d42864ff1e681580e738c82b005bcbfb (patch)
tree2c7c624104c1c4f449d434602edef3b4961831fb /render/wlr_renderer.c
parent44b1ff16e9bc9d3a0afc86c1afafd1efcdada806 (diff)
render/egl: support config-less wlr_egl
When using wlr_swapchain, there's no need to select an EGLConfig. Add support for creating config-less EGL contexts.
Diffstat (limited to 'render/wlr_renderer.c')
-rw-r--r--render/wlr_renderer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 3703f419..b8374be9 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -268,7 +268,11 @@ struct wlr_renderer *wlr_renderer_autocreate(struct wlr_egl *egl,
memcpy(&all_config_attribs[config_attribs_len], gles2_config_attribs,
sizeof(gles2_config_attribs));
- if (!wlr_egl_init(egl, platform, remote_display, all_config_attribs,
+ if (config_attribs != NULL) {
+ config_attribs = all_config_attribs;
+ }
+
+ if (!wlr_egl_init(egl, platform, remote_display, config_attribs,
visual_id)) {
wlr_log(WLR_ERROR, "Could not initialize EGL");
return NULL;