Skip to content

Commit

Permalink
provide Default for AccelerationStructureInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Jan 11, 2025
1 parent 1f620a3 commit a79990e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion blade-graphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,18 @@ pub struct AccelerationStructureInstance {
pub custom_index: u32,
}

#[derive(Clone, Copy, Debug, PartialEq)]
impl Default for AccelerationStructureInstance {
fn default() -> Self {
Self {
acceleration_structure_index: 0,
transform: IDENTITY_TRANSFORM,
mask: 0xFF,
custom_index: 0,
}
}
}

#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct AccelerationStructureSizes {
/// Size of the permanent GPU data
pub data: u64,
Expand Down
2 changes: 1 addition & 1 deletion blade-render/src/asset_hub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl AssetHub {
&'a self,
base_path: &'a Path,
name: N,
) -> LoadContext {
) -> LoadContext<'a> {
LoadContext {
asset_hub: self,
base_path,
Expand Down

0 comments on commit a79990e

Please sign in to comment.