mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 12:21:31 +11:00
Migrate the bevy example to stageless
This commit is contained in:
parent
020a7f5c01
commit
7abbf2ece2
|
@ -7,5 +7,5 @@ description = "Example of using Vello in a Bevy application"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bevy = { git = "https://github.com/bevyengine/bevy", rev = "5d514fb24f2459700f68d8e57d4791bdf5b1b595" }
|
||||
bevy = { git = "https://github.com/bevyengine/bevy", rev = "4fd092fbec07416fa9b1e2306f61231ae20315ac" }
|
||||
vello = { path = "../../" }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use bevy::render::RenderSet;
|
||||
use vello::kurbo::{Affine, Point, Rect};
|
||||
use vello::peniko::{Color, Fill, Gradient, Stroke};
|
||||
use vello::{Renderer, Scene, SceneBuilder, SceneFragment};
|
||||
|
@ -11,7 +12,7 @@ use bevy::{
|
|||
Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages,
|
||||
},
|
||||
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 };
|
||||
render_app.init_resource::<VelloRenderer>();
|
||||
// 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