Skip to content

Commit

Permalink
remove from loader
Browse files Browse the repository at this point in the history
  • Loading branch information
EtaLoop committed Oct 2, 2024
1 parent a45071a commit e69b313
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions crates/viewer/re_renderer/src/importer/obj.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use re_types::components::{AlbedoFactor, Color};
use re_types::components::Color;
use smallvec::smallvec;

use crate::{
Expand All @@ -26,7 +26,6 @@ pub fn load_obj_from_buffer(
buffer: &[u8],
ctx: &RenderContext,
vertex_colors: &Option<Vec<Color>>,
albedo_factor: &Option<AlbedoFactor>,
) -> Result<Vec<MeshInstance>, ObjImportError> {
re_tracing::profile_function!();

Expand Down Expand Up @@ -102,7 +101,7 @@ pub fn load_obj_from_buffer(
label: "default material".into(),
index_range: 0..mesh.indices.len() as u32,
albedo: texture.clone(),
albedo_factor: albedo_factor.map_or(crate::Rgba::WHITE, |c| c.0.into()),
albedo_factor: crate::Rgba::WHITE,
}],
};

Expand Down
3 changes: 1 addition & 2 deletions crates/viewer/re_renderer/src/importer/stl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub fn load_stl_from_buffer(
let Asset3D {
blob,
vertex_colors,
albedo_factor,
..
} = asset3d;

Expand Down Expand Up @@ -65,7 +64,7 @@ pub fn load_stl_from_buffer(
label: name.clone().into(),
index_range: 0..num_vertices as u32,
albedo: ctx.texture_manager_2d.white_texture_unorm_handle().clone(),
albedo_factor: albedo_factor.map_or(crate::Rgba::WHITE, |c| c.0.into()),
albedo_factor: crate::Rgba::WHITE,
};

let mesh = mesh::Mesh {
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_renderer_examples/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ pub fn load_rerun_mesh(re_ctx: &RenderContext) -> Vec<re_renderer::renderer::Mes
let mut zipped_obj = zip.by_name("rerun.obj").unwrap();
let mut obj_data = Vec::new();
std::io::Read::read_to_end(&mut zipped_obj, &mut obj_data).unwrap();
re_renderer::importer::obj::load_obj_from_buffer(&obj_data, re_ctx, &None, &None).unwrap()
re_renderer::importer::obj::load_obj_from_buffer(&obj_data, re_ctx, &None).unwrap()
}

struct WrapApp<E: Example + 'static> {
Expand Down
1 change: 0 additions & 1 deletion crates/viewer/re_space_view_spatial/src/mesh_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ impl LoadedMesh {
bytes,
render_ctx,
&asset3d.vertex_colors,
&asset3d.albedo_factor,
)?,
MediaType::STL => {
re_renderer::importer::stl::load_stl_from_buffer(asset3d, render_ctx, texture_key)?
Expand Down

0 comments on commit e69b313

Please sign in to comment.