diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-28 00:14:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 00:14:57 -0400 |
commit | 330ee081269790922a46091399b616b12ce14f51 (patch) | |
tree | ffe735fa4b9ca2b058be2c69ccad290dc090d883 /examples/rotation.c | |
parent | 48e8202883594091d2ec2b5d0d8a55ddf2f0aea6 (diff) | |
parent | adf4fb08dde2fa3e981213dd6a8c97de1f93c110 (diff) |
Merge pull request #744 from emersion/texture-redesign
Redesign wlr_texture
Diffstat (limited to 'examples/rotation.c')
-rw-r--r-- | examples/rotation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rotation.c b/examples/rotation.c index cbff09a1..dfafeeca 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -142,13 +142,13 @@ int main(int argc, char *argv[]) { wlr_log(L_ERROR, "Could not start compositor, OOM"); exit(EXIT_FAILURE); } - state.cat_texture = wlr_render_texture_create(state.renderer); + 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 (!state.cat_texture) { wlr_log(L_ERROR, "Could not start compositor, OOM"); exit(EXIT_FAILURE); } - wlr_texture_upload_pixels(state.cat_texture, WL_SHM_FORMAT_ABGR8888, - cat_tex.width, cat_tex.width, cat_tex.height, cat_tex.pixel_data); if (!wlr_backend_start(compositor.backend)) { wlr_log(L_ERROR, "Failed to start backend"); |