Skip to content

Commit

Permalink
fix clippies
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidster committed Feb 18, 2024
1 parent acddea1 commit e76a8b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions ikari/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,15 @@ pub enum CullingFrustumLock {
None,
}

type MeshMaterialIndexPair = (usize, usize);

pub struct RendererPrivateData {
// cpu
all_bone_transforms: AllBoneTransforms,
all_pbr_instances: ChunkedBuffer<GpuPbrMeshInstance, (usize, usize)>,
all_pbr_instances: ChunkedBuffer<GpuPbrMeshInstance, MeshMaterialIndexPair>,
all_pbr_instances_culling_masks: Vec<BitVec>,
pbr_mesh_index_to_gpu_instances:
HashMap<(usize, usize), (SmallVec<[GpuPbrMeshInstance; 1]>, BitVec)>,
HashMap<MeshMaterialIndexPair, (SmallVec<[GpuPbrMeshInstance; 1]>, BitVec)>,
all_unlit_instances: ChunkedBuffer<GpuUnlitMeshInstance, usize>,
all_transparent_instances: ChunkedBuffer<GpuUnlitMeshInstance, usize>,
all_wireframe_instances: ChunkedBuffer<GpuWireframeMeshInstance, usize>,
Expand Down Expand Up @@ -3534,8 +3536,8 @@ impl Renderer {
fn get_node_cam_intersection_result(
node: &GameNode,
node_bounding_sphere: Sphere,
data: &RendererData,
scene: &Scene,
_data: &RendererData,
_scene: &Scene,
camera_culling_frustum: &Frustum,
) -> Option<IntersectionResult> {
node.visual.as_ref()?;
Expand Down Expand Up @@ -5369,6 +5371,7 @@ impl Renderer {
}

#[profiling::function]
#[allow(clippy::too_many_arguments)]
pub fn prepare_and_cull_instances(
engine_state: &EngineState,
data: &RendererData,
Expand Down Expand Up @@ -5426,9 +5429,9 @@ impl Renderer {
node,
data,
engine_state,
&culling_frustum,
&point_lights_frusta,
&resolved_directional_light_cascades,
culling_frustum,
point_lights_frusta,
resolved_directional_light_cascades,
&mut tmp_node_culling_mask,
);

Expand Down
2 changes: 1 addition & 1 deletion ikari/src/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl Scene {
pub fn get_node_bounding_sphere_opt(
&self,
node_id: GameNodeId,
renderer_data: &RendererData,
_renderer_data: &RendererData,
) -> Sphere {
let GameNodeId(node_index, _) = node_id;
self.global_node_bounding_spheres[node_index as usize]
Expand Down
2 changes: 1 addition & 1 deletion ikari/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use rapier3d_f64::prelude::*;

use glam::{
f32::{Mat3, Mat4, Quat, Vec3},
Affine3A, Vec3A,
Affine3A,
};
use std::ops::{Deref, DerefMut, Mul};

Expand Down

0 comments on commit e76a8b1

Please sign in to comment.