mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
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.
This commit is contained in:
parent
44b1ff16e9
commit
037710b1d4
2 changed files with 18 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue