Documentation for <wlr/render/pass.h>
Table of contents
struct wlr_buffer_pass_options ¶
struct wlr_buffer_pass_options { /* Timer to measure the duration of the render pass */ struct wlr_render_timer *timer; /* Color transform to apply to the output of the render pass, * leave NULL to indicate sRGB/no custom transform */ struct wlr_color_transform *color_transform; };
enum wlr_render_blend_mode ¶
enum wlr_render_blend_mode { /* Pre-multiplied alpha (default) */ WLR_RENDER_BLEND_MODE_PREMULTIPLIED, /* Blending is disabled */ WLR_RENDER_BLEND_MODE_NONE, };
Blend modes.
struct wlr_render_color ¶
struct wlr_render_color { float r, g, b, a; };
A color value.
Each channel has values between 0 and 1 inclusive. The R, G, B channels need to be pre-multiplied by A.
wlr_render_pass_add_rect() ¶
void wlr_render_pass_add_rect(struct wlr_render_pass *render_pass, const struct wlr_render_rect_options *options);
Render a rectangle.
wlr_render_pass_add_texture() ¶
void wlr_render_pass_add_texture(struct wlr_render_pass *render_pass, const struct wlr_render_texture_options *options);
Render a texture.
wlr_render_pass_submit() ¶
bool wlr_render_pass_submit(struct wlr_render_pass *render_pass);
struct wlr_render_rect_options ¶
struct wlr_render_rect_options { /* Rectangle coordinates */ struct wlr_box box; /* Source color */ struct wlr_render_color color; /* Clip region, leave NULL to disable clipping */ const pixman_region32_t *clip; /* Blend mode */ enum wlr_render_blend_mode blend_mode; };
struct wlr_render_texture_options ¶
struct wlr_render_texture_options { /* Source texture */ struct wlr_texture *texture; /* Source coordinates, leave empty to render the whole texture */ struct wlr_fbox src_box; /* Destination coordinates, width/height default to the texture size */ struct wlr_box dst_box; /* Opacity between 0 (transparent) and 1 (opaque), leave NULL for opaque */ const float *alpha; /* Clip region, leave NULL to disable clipping */ const pixman_region32_t *clip; /* Transform applied to the source texture */ enum wl_output_transform transform; /* Filtering */ enum wlr_scale_filter_mode filter_mode; /* Blend mode */ enum wlr_render_blend_mode blend_mode; };
wlr_renderer_begin_buffer_pass() ¶
struct wlr_render_pass *wlr_renderer_begin_buffer_pass(struct wlr_renderer *renderer, struct wlr_buffer *buffer, const struct wlr_buffer_pass_options *options);
Begin a new render pass with the supplied destination buffer.
Callers must call wlr_render_pass_submit() once they are done with the render pass.
enum wlr_scale_filter_mode ¶
enum wlr_scale_filter_mode { /* bilinear texture filtering (default) */ WLR_SCALE_FILTER_BILINEAR, /* nearest texture filtering */ WLR_SCALE_FILTER_NEAREST, };
Filter modes.