INNER CODE UNIT · Rust

unbind_and_free

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

    fn unbind_and_free(
        &mut self,
        bound_tex: HashMap<egui::TextureId, AnyImageNode>,
        graph: &mut Graph,
        deltas: &egui::TexturesDelta,
    ) {
        // Unbind textures
        for (id, tex) in bound_tex.iter() {
            if let AnyImageNode::Pooled(tex) = tex
                && let egui::TextureId::Managed(_) = *id
            {
                self.textures.insert(*id, graph.resource(*tex).clone());
            }
        }

        // Free textures
        for id in deltas.free.iter() {
            self.textures.remove(id);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…