Function push_composite_quad_local

Source
pub fn push_composite_quad_local(
    arena: &mut Vec<TexVertex>,
    local_surface: [f32; 2],
    dest: Rect,
    tint: [f32; 4],
) -> Range<u32>
Expand description

NDC quad in local offscreen space (origin top-left of the pass).

This has the same six-vertex layout as push_composite_quad, but the supplied surface extent is the local offscreen allocation.

ยงExamples

use ailloli_ui_core::Rect;
use ailloli_ui_render_wgpu::cmd_bounds::push_composite_quad_local;
let mut vertices = Vec::new();
let range = push_composite_quad_local(&mut vertices, [32.0, 32.0],
    Rect::new(4.0, 4.0, 8.0, 8.0), [0.5, 0.5, 0.5, 1.0]);
assert_eq!((range.start, range.end), (0, 6));