aboutsummaryrefslogtreecommitdiff
path: root/examples/output-layout.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-02 15:57:04 -0400
committeremersion <contact@emersion.fr>2018-04-02 15:57:04 -0400
commit8836b4f024f957971cae28a0fdc567ff16c8fbc8 (patch)
tree23be1fc669c4fc721a521691ce182041cc7c5237 /examples/output-layout.c
parentcadfccf1fde164646b175401a3fb1d3108b4af9a (diff)
parentd466cc117f95d34e239049a5af701b7ba696d336 (diff)
Merge branch 'master' into xwayland-dnd
Diffstat (limited to 'examples/output-layout.c')
-rw-r--r--examples/output-layout.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/output-layout.c b/examples/output-layout.c
index 45d896b0..b04e86b7 100644
--- a/examples/output-layout.c
+++ b/examples/output-layout.c
@@ -13,7 +13,6 @@
#include <wayland-server.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
-#include <wlr/render/gles2.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_matrix.h>
@@ -196,10 +195,10 @@ int main(int argc, char *argv[]) {
compositor.keyboard_key_cb = handle_keyboard_key;
compositor_init(&compositor);
- state.renderer = wlr_gles2_renderer_create(compositor.backend);
- state.cat_texture = wlr_render_texture_create(state.renderer);
- wlr_texture_upload_pixels(state.cat_texture, WL_SHM_FORMAT_ABGR8888,
- cat_tex.width, cat_tex.width, cat_tex.height, cat_tex.pixel_data);
+ state.renderer = wlr_backend_get_renderer(compositor.backend);
+ state.cat_texture = wlr_texture_from_pixels(state.renderer,
+ WL_SHM_FORMAT_ABGR8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
+ cat_tex.pixel_data);
if (!wlr_backend_start(compositor.backend)) {
wlr_log(L_ERROR, "Failed to start backend");