aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
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,