fix(wayland): move model node updates to Update to fix texture updates
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -33,6 +33,8 @@ const HOLDOUT_MATERIAL_HANDLE: Handle<HoldoutMaterial> =
|
|||||||
weak_handle!("d56f1d62-9121-434b-a34f-9f0bbd6b3390");
|
weak_handle!("d56f1d62-9121-434b-a34f-9f0bbd6b3390");
|
||||||
|
|
||||||
pub struct ModelNodePlugin;
|
pub struct ModelNodePlugin;
|
||||||
|
#[derive(SystemSet, Hash, Debug, PartialEq, Eq, Clone, Copy)]
|
||||||
|
pub struct ModelNodeSystemSet;
|
||||||
impl Plugin for ModelNodePlugin {
|
impl Plugin for ModelNodePlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
LOAD_MODEL.init(app);
|
LOAD_MODEL.init(app);
|
||||||
@@ -49,14 +51,15 @@ impl Plugin for ModelNodePlugin {
|
|||||||
.insert(&HOLDOUT_MATERIAL_HANDLE, HoldoutMaterial::default());
|
.insert(&HOLDOUT_MATERIAL_HANDLE, HoldoutMaterial::default());
|
||||||
|
|
||||||
app.init_resource::<MaterialRegistry>();
|
app.init_resource::<MaterialRegistry>();
|
||||||
app.add_systems(Update, load_models);
|
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
PostUpdate,
|
Update,
|
||||||
(
|
(
|
||||||
|
load_models,
|
||||||
gen_model_parts.after(TransformSystem::TransformPropagate),
|
gen_model_parts.after(TransformSystem::TransformPropagate),
|
||||||
apply_materials,
|
apply_materials,
|
||||||
)
|
)
|
||||||
.chain(),
|
.chain()
|
||||||
|
.in_set(ModelNodeSystemSet),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ pub mod vulkano_data;
|
|||||||
pub mod xdg;
|
pub mod xdg;
|
||||||
|
|
||||||
use crate::core::registry::OwnedRegistry;
|
use crate::core::registry::OwnedRegistry;
|
||||||
|
use crate::nodes::drawable::model::ModelNodeSystemSet;
|
||||||
use crate::wayland::core::seat::SeatMessage;
|
use crate::wayland::core::seat::SeatMessage;
|
||||||
use crate::{
|
use crate::{
|
||||||
BevyMaterial,
|
BevyMaterial,
|
||||||
@@ -286,7 +287,7 @@ static RENDER_DEVICE: OnceLock<RenderDevice> = OnceLock::new();
|
|||||||
pub struct WaylandPlugin;
|
pub struct WaylandPlugin;
|
||||||
impl Plugin for WaylandPlugin {
|
impl Plugin for WaylandPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_systems(Update, update_graphics);
|
app.add_systems(Update, update_graphics.before(ModelNodeSystemSet));
|
||||||
app.init_resource::<UsedBuffers>();
|
app.init_resource::<UsedBuffers>();
|
||||||
app.sub_app_mut(RenderApp)
|
app.sub_app_mut(RenderApp)
|
||||||
.init_resource::<UsedBuffers>()
|
.init_resource::<UsedBuffers>()
|
||||||
|
|||||||
Reference in New Issue
Block a user