aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render.h
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-08 12:02:51 -0400
committerDrew DeVault <sir@cmpwn.com>2017-06-08 12:02:51 -0400
commit83f8864f0ab1722aae12cc744094a7424c41f2d8 (patch)
treeab9fdff6a4c528f3ace607db76911fa805c0822a /include/wlr/render.h
parent211488131f675b3f3c59607fb1336b69148023d2 (diff)
Add wlr_renderer and move quad rendering there
Diffstat (limited to 'include/wlr/render.h')
-rw-r--r--include/wlr/render.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/wlr/render.h b/include/wlr/render.h
index d3abfcc3..3335b3d5 100644
--- a/include/wlr/render.h
+++ b/include/wlr/render.h
@@ -4,10 +4,10 @@
#include <wayland-server-protocol.h>
struct wlr_surface;
-struct wlr_surface *wlr_surface_create();
-void wlr_surface_attach_pixels(struct wlr_surface *tex, uint32_t format,
+struct wlr_surface *wlr_surface_init();
+void wlr_surface_attach_pixels(struct wlr_surface *surf, uint32_t format,
int width, int height, const unsigned char *pixels);
-void wlr_surface_attach_shm(struct wlr_surface *tex, uint32_t format,
+void wlr_surface_attach_shm(struct wlr_surface *surf, uint32_t format,
struct wl_shm_buffer *shm);
// TODO: EGL
void wlr_surface_destroy(struct wlr_surface *tex);
@@ -23,7 +23,9 @@ struct wlr_renderer;
struct wlr_renderer *wlr_renderer_init();
void wlr_renderer_set_shader(struct wlr_renderer *renderer,
struct wlr_shader *shader);
-bool wlr_render_quad(struct wlr_renderer *renderer, struct wlr_surface *tex,
- float x, float y, float width, float height);
+bool wlr_render_quad(struct wlr_renderer *renderer,
+ struct wlr_surface *surf, float (*transform)[16],
+ float x, float y);
+void wlr_renderer_destroy(struct wlr_renderer *renderer);
#endif