INNER CODE UNIT · Rust

bind_and_update_textures

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

    fn bind_and_update_textures(
        &mut self,
        deltas: &egui::TexturesDelta,
        graph: &mut Graph,
    ) -> HashMap<egui::TextureId, AnyImageNode> {
        let mut bound_tex = deltas
            .set
            .iter()
            .map(|(id, delta)| {
                let pixels = match &delta.image {
                    egui::ImageData::Color(image) => {
                        assert_eq!(image.width() * image.height(), image.pixels.len());
                        Cow::Borrowed(&image.pixels)
                    }
                };

                let tmp_buf = {
                    let mut buf = self

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…