mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-13 13:29:44 -05:00
Add wlr_renderer and move quad rendering there
This commit is contained in:
parent
211488131f
commit
83f8864f0a
7 changed files with 215 additions and 130 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue