mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render: add wlr_renderer_clear and wlr_renderer_scissor
This commit is contained in:
parent
3f1c4f5be7
commit
415a2b7c56
10 changed files with 67 additions and 23 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <wayland-server-protocol.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
||||
struct wlr_texture;
|
||||
|
|
@ -12,6 +13,9 @@ struct wlr_renderer;
|
|||
|
||||
void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *output);
|
||||
void wlr_renderer_end(struct wlr_renderer *r);
|
||||
void wlr_renderer_clear(struct wlr_renderer *r, float red, float green,
|
||||
float blue, float alpha);
|
||||
void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box);
|
||||
/**
|
||||
* Requests a texture handle from this renderer.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -72,7 +72,4 @@ const char *egl_error(void);
|
|||
bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface,
|
||||
int *buffer_age);
|
||||
|
||||
// TODO: remove
|
||||
int wlr_egl_get_buffer_age(struct wlr_egl *egl, EGLSurface surface);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <EGL/eglext.h>
|
||||
#include <stdbool.h>
|
||||
#include <wlr/render.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
||||
struct wlr_renderer_impl;
|
||||
|
|
@ -17,6 +18,9 @@ struct wlr_renderer {
|
|||
struct wlr_renderer_impl {
|
||||
void (*begin)(struct wlr_renderer *renderer, struct wlr_output *output);
|
||||
void (*end)(struct wlr_renderer *renderer);
|
||||
void (*clear)(struct wlr_renderer *renderer, float red, float green,
|
||||
float blue, float alpha);
|
||||
void (*scissor)(struct wlr_renderer *renderer, struct wlr_box *box);
|
||||
struct wlr_texture *(*texture_create)(struct wlr_renderer *renderer);
|
||||
bool (*render_with_matrix)(struct wlr_renderer *renderer,
|
||||
struct wlr_texture *texture, const float (*matrix)[16]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue