mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
Merge pull request #275 from DJMcNab/bevy_stageless
Migrate the bevy example to stageless
This commit is contained in:
commit
fb4cfcdc9e
|
@ -10,5 +10,5 @@ repository.workspace = true
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = { git = "https://github.com/bevyengine/bevy", rev = "5d514fb24f2459700f68d8e57d4791bdf5b1b595" }
|
bevy = { git = "https://github.com/bevyengine/bevy", rev = "4fd092fbec07416fa9b1e2306f61231ae20315ac" }
|
||||||
vello = { path = "../../" }
|
vello = { path = "../../" }
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
use bevy::render::RenderSet;
|
||||||
use vello::kurbo::{Affine, Point, Rect};
|
use vello::kurbo::{Affine, Point, Rect};
|
||||||
use vello::peniko::{Color, Fill, Gradient, Stroke};
|
use vello::peniko::{Color, Fill, Gradient, Stroke};
|
||||||
use vello::{Renderer, Scene, SceneBuilder, SceneFragment};
|
use vello::{Renderer, Scene, SceneBuilder, SceneFragment};
|
||||||
|
@ -11,7 +12,7 @@ use bevy::{
|
||||||
Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages,
|
Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages,
|
||||||
},
|
},
|
||||||
renderer::{RenderDevice, RenderQueue},
|
renderer::{RenderDevice, RenderQueue},
|
||||||
RenderApp, RenderStage,
|
RenderApp,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ impl Plugin for VelloPlugin {
|
||||||
let Ok(render_app) = app.get_sub_app_mut(RenderApp) else { return };
|
let Ok(render_app) = app.get_sub_app_mut(RenderApp) else { return };
|
||||||
render_app.init_resource::<VelloRenderer>();
|
render_app.init_resource::<VelloRenderer>();
|
||||||
// This should probably use the render graph, but working out the dependencies there is awkward
|
// This should probably use the render graph, but working out the dependencies there is awkward
|
||||||
render_app.add_system_to_stage(RenderStage::Render, render_scenes);
|
render_app.add_system(render_scenes.in_set(RenderSet::Render));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue