From 7abbf2ece2ddb041b900ab4657de9e628c76f99a Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 6 Feb 2023 15:45:36 +0000 Subject: [PATCH] Migrate the bevy example to stageless --- examples/with_bevy/Cargo.toml | 2 +- examples/with_bevy/src/main.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/with_bevy/Cargo.toml b/examples/with_bevy/Cargo.toml index 818b8be..88a3440 100644 --- a/examples/with_bevy/Cargo.toml +++ b/examples/with_bevy/Cargo.toml @@ -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 = "../../" } diff --git a/examples/with_bevy/src/main.rs b/examples/with_bevy/src/main.rs index 0f2c3a4..e46c7c8 100644 --- a/examples/with_bevy/src/main.rs +++ b/examples/with_bevy/src/main.rs @@ -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::(); // 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)); } }