Skip to content

Commit

Permalink
fixed render_settings -> render_creation
Browse files Browse the repository at this point in the history
  • Loading branch information
MalekiRe committed Sep 26, 2023
1 parent f3a3ffb commit 55d8293
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/bevy_render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl Plugin for RenderPlugin {
app.init_asset::<Shader>()
.init_asset_loader::<ShaderLoader>();

match &self.render_settings {
match &self.render_creation {
RenderCreation::Manual(device, queue, adapter_info, adapter, instance) => {
let future_renderer_resources_wrapper = Arc::new(Mutex::new(Some((
device.clone(),
Expand All @@ -254,8 +254,8 @@ impl Plugin for RenderPlugin {
));
unsafe { initialize_render_app(app) };
}
RenderCreation::Automatic(render_settings) => {
if let Some(backends) = render_settings.backends {
RenderCreation::Automatic(render_creation) => {
if let Some(backends) = render_creation.backends {
let future_renderer_resources_wrapper = Arc::new(Mutex::new(None));
app.insert_resource(FutureRendererResources(
future_renderer_resources_wrapper.clone(),
Expand All @@ -266,7 +266,7 @@ impl Plugin for RenderPlugin {
> = SystemState::new(&mut app.world);
let primary_window = system_state.get(&app.world).get_single().ok().cloned();

let settings = render_settings.clone();
let settings = render_creation.clone();
let async_renderer = async move {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends,
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/wireframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
App::new()
.add_plugins((
DefaultPlugins.set(RenderPlugin {
render_settings: WgpuSettings {
render_creation: WgpuSettings {
features: WgpuFeatures::POLYGON_MODE_LINE,
..default()
}
Expand Down
2 changes: 1 addition & 1 deletion examples/app/no_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn main() {
App::new()
.add_plugins(
DefaultPlugins.set(RenderPlugin {
render_settings: WgpuSettings {
render_creation: WgpuSettings {
backends: None,
..default()
}
Expand Down

0 comments on commit 55d8293

Please sign in to comment.