Skip to content

Commit

Permalink
More cleanup and stubs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia committed Feb 1, 2024
1 parent dfbb8a8 commit fa33bbd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
16 changes: 13 additions & 3 deletions bevy_nannou_render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
)
Expand Down Expand Up @@ -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
}

Expand All @@ -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<RenderDevice>,
mut texture_bind_group_cache: ResMut<TextureBindGroupCache>,
) {
// 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 {
Expand Down
7 changes: 1 addition & 6 deletions bevy_nannou_render/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions result

0 comments on commit fa33bbd

Please sign in to comment.