Skip to content

Commit

Permalink
prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Aug 31, 2024
1 parent 9f378da commit 3da9d64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions crates/renderling/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ pub mod tutorial;
#[cfg(not(target_arch = "spirv"))]
pub use context::*;

pub mod prelude {
//! A prelude, meant to be glob-imported.
pub extern crate glam;
pub use crate::{camera::*, pbr::Material, slab::*, stage::*, Context};
}

#[macro_export]
/// A wrapper around `std::println` that is a noop on the GPU.
macro_rules! println {
Expand Down
6 changes: 4 additions & 2 deletions crates/renderling/src/stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ mod test {

use glam::{Mat4, Quat, Vec3};

use crate::{slab::SlabAllocator, stage::NestedTransform, transform::Transform};
use crate::{
math::IsMatrix, slab::SlabAllocator, stage::NestedTransform, transform::Transform,
};

#[test]
fn matrix_hierarchy_sanity() {
Expand Down Expand Up @@ -550,7 +552,7 @@ mod test {
) * mat;
local = t.parent();
}
let (s, r, t) = mat.to_scale_rotation_translation();
let (s, r, t) = mat.to_scale_rotation_translation_or_id();
(t, r, s)
}

Expand Down

0 comments on commit 3da9d64

Please sign in to comment.