diff --git a/bevy_nannou_render/src/lib.rs b/bevy_nannou_render/src/lib.rs index c8a86b265..8c7da23ef 100644 --- a/bevy_nannou_render/src/lib.rs +++ b/bevy_nannou_render/src/lib.rs @@ -43,6 +43,7 @@ impl Plugin for NannouRenderPlugin { Prepare, ( prepare_view_mesh, + prepare_texture_bind_groups.in_set(RenderSet::PrepareBindGroups), prepare_view_uniform.in_set(RenderSet::PrepareBindGroups), ), ) @@ -71,9 +72,8 @@ impl Plugin for NannouRenderPlugin { } } -fn prepare_view_mesh( - commands: Commands, -) { +// Prepare our mesh for rendering +fn prepare_view_mesh(commands: Commands) { // TODO: process the extracted draw components } @@ -93,6 +93,16 @@ fn prepare_view_uniform( } } +// Prepare user uploaded textures for rendering +fn prepare_texture_bind_groups( + mut commands: Commands, + render_device: Res, + mut texture_bind_group_cache: ResMut, +) { + // TODO: draw will add the texture as a component that + // will be extracted here and added to the cache +} + // Resource wrapper for our view uniform bind group #[derive(Resource)] struct ViewUniformBindGroup { diff --git a/bevy_nannou_render/src/pipeline.rs b/bevy_nannou_render/src/pipeline.rs index 3eb1525e9..bd5e33e30 100644 --- a/bevy_nannou_render/src/pipeline.rs +++ b/bevy_nannou_render/src/pipeline.rs @@ -108,8 +108,7 @@ impl NannouPipeline { offset: 0, shader_location: 3, }]) - // TODO: figure out how to use the default depth buffer. - // .depth_format(depth_format) + .depth_format(depth_format) .sample_count(sample_count) .color_blend(blend_state.color) .alpha_blend(blend_state.alpha) @@ -248,10 +247,6 @@ impl FromWorld for NannouPipeline { .into_iter() .collect(); - // Bind group per user-uploaded texture. - // let texture_bind_group_layouts = Default::default(); - // let texture_bind_groups = Default::default(); - let texture_bind_group_layout = Self::create_texture_bind_group_layout( device, bevy_nannou_wgpu::sampler_filtering(&sampler_desc), diff --git a/result b/result new file mode 120000 index 000000000..6f5c56c64 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/gyl0afb7w4yba6ryjzw6a1az8ixii3vg-nannou-0.19.0 \ No newline at end of file