Replace addons with conventional handles
Provide the single-loadout Scene API, SAB-backed meshes, cameras, materials, lights, workers, post effects, and tutorial playgrounds. Batch matching row growth so active GPU loadouts refresh once. Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
@@ -54,7 +54,14 @@ impl Store {
|
||||
if !self.uses_rows(name) {
|
||||
return Ok(());
|
||||
}
|
||||
let graph = self.active.as_ref().unwrap().graph.clone();
|
||||
self.refresh(gpu, data)
|
||||
}
|
||||
|
||||
pub fn refresh(&mut self, gpu: &Wgpu, data: &RenderData) -> Result<(), String> {
|
||||
let Some(active) = self.active.as_ref() else {
|
||||
return Ok(());
|
||||
};
|
||||
let graph = active.graph.clone();
|
||||
let resources = GpuResources::activate(&graph, gpu, data)?;
|
||||
self.active = Some(Loadout { graph, resources });
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user