2022-11-19 17:55:49 +11:00
|
|
|
#![feature(strict_provenance)]
|
2022-11-20 17:09:05 +11:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2022-11-19 17:55:49 +11:00
|
|
|
|
2022-11-20 10:48:54 +11:00
|
|
|
mod binding;
|
2022-11-20 14:09:01 +11:00
|
|
|
mod filter_chain;
|
2022-11-20 15:16:57 +11:00
|
|
|
mod filter_pass;
|
|
|
|
mod framebuffer;
|
|
|
|
mod hello_triangle;
|
2022-11-20 15:16:19 +11:00
|
|
|
mod render_target;
|
2022-11-20 15:16:57 +11:00
|
|
|
mod util;
|
2022-11-21 18:13:10 +11:00
|
|
|
mod quad_render;
|
2022-11-14 16:14:05 +11:00
|
|
|
|
2022-11-21 18:56:03 +11:00
|
|
|
pub use filter_chain::FilterChain;
|
|
|
|
pub use framebuffer::Viewport;
|
|
|
|
pub use framebuffer::GlImage;
|
|
|
|
pub use framebuffer::Framebuffer;
|
|
|
|
|
2022-11-09 17:11:25 +11:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
2022-11-20 15:16:57 +11:00
|
|
|
use crate::filter_chain::FilterChain;
|
2022-11-09 17:11:25 +11:00
|
|
|
|
2022-11-12 13:52:22 +11:00
|
|
|
#[test]
|
|
|
|
fn triangle() {
|
|
|
|
let (glfw, window, events, shader, vao) = hello_triangle::setup();
|
2022-11-21 18:56:03 +11:00
|
|
|
let mut filter = FilterChain::load_from_path("../test/slang-shaders/crt/crt-royale-fake-bloom.slangp").unwrap();
|
2022-11-19 17:55:49 +11:00
|
|
|
|
2022-11-17 17:21:29 +11:00
|
|
|
// FilterChain::load("../test/slang-shaders/crt/crt-royale.slangp").unwrap();
|
2022-11-14 16:14:05 +11:00
|
|
|
|
2022-11-20 15:16:57 +11:00
|
|
|
hello_triangle::do_loop(glfw, window, events, shader, vao, &mut filter);
|
2022-11-12 13:52:22 +11:00
|
|
|
}
|
|
|
|
|
2022-11-12 17:23:49 +11:00
|
|
|
// #[test]
|
|
|
|
// fn load_preset() {
|
|
|
|
//
|
|
|
|
// load("../test/basic.slangp")
|
|
|
|
// .unwrap();
|
|
|
|
// }
|
2022-11-09 17:11:25 +11:00
|
|
|
}
|