aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-02-23 17:36:32 +0100
committerSimon Ser <contact@emersion.fr>2021-02-23 17:36:32 +0100
commit675bc396583f2e1e30ce2a5a91769cc58be9948a (patch)
tree49b16b780bfe1da70d9504bd05291312e55cade8 /examples
parentc2815fd44de5d74e379c118b4ccded5a9419e32c (diff)
Fix wl_shm_format passed to wlr_texture_from_pixels
Fixes: 27fba3df4347 ("render: use DRM formats in wlr_texture_from_pixels")
Diffstat (limited to 'examples')
-rw-r--r--examples/output-layout.c3
-rw-r--r--examples/rotation.c3
-rw-r--r--examples/touch.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/examples/output-layout.c b/examples/output-layout.c
index 0c86abcc..cacee014 100644
--- a/examples/output-layout.c
+++ b/examples/output-layout.c
@@ -1,4 +1,5 @@
#define _POSIX_C_SOURCE 200112L
+#include <drm_fourcc.h>
#include <GLES2/gl2.h>
#include <limits.h>
#include <math.h>
@@ -279,7 +280,7 @@ int main(int argc, char *argv[]) {
state.renderer = wlr_backend_get_renderer(wlr);
state.cat_texture = wlr_texture_from_pixels(state.renderer,
- WL_SHM_FORMAT_ABGR8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
+ DRM_FORMAT_ABGR8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
cat_tex.pixel_data);
if (!wlr_backend_start(wlr)) {
diff --git a/examples/rotation.c b/examples/rotation.c
index 4eb600d9..17bb4384 100644
--- a/examples/rotation.c
+++ b/examples/rotation.c
@@ -1,4 +1,5 @@
#define _POSIX_C_SOURCE 200112L
+#include <drm_fourcc.h>
#include <GLES2/gl2.h>
#include <getopt.h>
#include <math.h>
@@ -259,7 +260,7 @@ int main(int argc, char *argv[]) {
exit(EXIT_FAILURE);
}
state.cat_texture = wlr_texture_from_pixels(state.renderer,
- WL_SHM_FORMAT_ABGR8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
+ DRM_FORMAT_ABGR8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
cat_tex.pixel_data);
if (!state.cat_texture) {
wlr_log(WLR_ERROR, "Could not start compositor, OOM");
diff --git a/examples/touch.c b/examples/touch.c
index c0053075..3184d8be 100644
--- a/examples/touch.c
+++ b/examples/touch.c
@@ -1,4 +1,5 @@
#define _POSIX_C_SOURCE 200112L
+#include <drm_fourcc.h>
#include <GLES2/gl2.h>
#include <math.h>
#include <stdint.h>
@@ -267,7 +268,7 @@ int main(int argc, char *argv[]) {
exit(EXIT_FAILURE);
}
state.cat_texture = wlr_texture_from_pixels(state.renderer,
- WL_SHM_FORMAT_ARGB8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
+ DRM_FORMAT_ARGB8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
cat_tex.pixel_data);
if (!state.cat_texture) {
wlr_log(WLR_ERROR, "Could not start compositor, OOM");