aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-26 20:13:31 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-11-28 13:28:15 -0500
commit5b64e2fc31ede4777343e06087d7b921b28be674 (patch)
treeba41e4c743f21799bbbccaf9a4dffabe86ff2828 /sway/desktop/render.c
parent456f49db35a025c86cfbd07628425be2aec29697 (diff)
Make GLES2 optional
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index efa3a0d9..ea9c37d9 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -1,11 +1,10 @@
#define _POSIX_C_SOURCE 200809L
#include <assert.h>
-#include <GLES2/gl2.h>
#include <stdlib.h>
#include <strings.h>
#include <time.h>
#include <wayland-server-core.h>
-#include <wlr/render/gles2.h>
+#include <wlr/config.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_buffer.h>
#include <wlr/types/wlr_damage_ring.h>
@@ -28,6 +27,10 @@
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"
+#if WLR_HAS_GLES2_RENDERER
+#include <wlr/render/gles2.h>
+#endif
+
struct render_data {
pixman_region32_t *damage;
float alpha;
@@ -74,6 +77,7 @@ static void scissor_output(struct wlr_output *wlr_output,
static void set_scale_filter(struct wlr_output *wlr_output,
struct wlr_texture *texture, enum scale_filter_mode scale_filter) {
+#if WLR_HAS_GLES2_RENDERER
if (!wlr_texture_is_gles2(texture)) {
return;
}
@@ -94,6 +98,7 @@ static void set_scale_filter(struct wlr_output *wlr_output,
case SCALE_FILTER_SMART:
assert(false); // unreachable
}
+#endif
}
static void render_texture(struct wlr_output *wlr_output,