INNER CODE UNIT · Rust

draw_primitive

attackgoat/vk-graph · crates/vk-graph-egui/src/lib.rs:214

    fn draw_primitive(
        &mut self,
        shapes: Vec<egui::epaint::ClippedShape>,
        bound_tex: &HashMap<egui::TextureId, AnyImageNode>,
        graph: &mut Graph,
        target: impl Into<AnyImageNode>,
    ) {
        let target = target.into();
        let target_info = graph.resource(target).info;
        for egui::ClippedPrimitive {
            clip_rect,
            primitive,
        } in self.ctx.tessellate(shapes, self.ctx.pixels_per_point())
        {
            match primitive {
                egui::epaint::Primitive::Mesh(mesh) => {
                    // Skip when there are no vertices to paint since we cannot allocate a buffer
                    // of length 0

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…