mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Clear bind groups on each frame
This commit is contained in:
parent
29ad64f1d8
commit
e65fe0e736
4 changed files with 10 additions and 0 deletions
|
@ -134,4 +134,6 @@ impl RenderResourceContext for HeadlessRenderResourceContext {
|
|||
.unwrap()
|
||||
.remove(&(handle, index));
|
||||
}
|
||||
fn clear_bind_groups(&self) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ pub trait RenderResourceContext: Downcast + Send + Sync + 'static {
|
|||
self.create_bind_group(bind_group, render_resource_assignments);
|
||||
}
|
||||
}
|
||||
fn clear_bind_groups(&self);
|
||||
}
|
||||
|
||||
impl dyn RenderResourceContext {
|
||||
|
|
|
@ -568,4 +568,8 @@ impl RenderResourceContext for WgpuRenderResourceContext {
|
|||
}
|
||||
None
|
||||
}
|
||||
|
||||
fn clear_bind_groups(&self) {
|
||||
self.resources.bind_groups.write().unwrap().clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,5 +129,8 @@ impl WgpuRenderer {
|
|||
render_resource_context
|
||||
.context
|
||||
.drop_all_swap_chain_textures();
|
||||
render_resource_context
|
||||
.context
|
||||
.clear_bind_groups();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue