2022-11-19 01:55:49 -05:00
|
|
|
#![feature(strict_provenance)]
|
2022-11-20 01:09:05 -05:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2022-11-19 01:55:49 -05:00
|
|
|
|
2022-11-19 18:48:54 -05:00
|
|
|
mod binding;
|
2022-11-19 22:09:01 -05:00
|
|
|
mod filter_chain;
|
2022-11-19 23:16:57 -05:00
|
|
|
mod filter_pass;
|
|
|
|
mod framebuffer;
|
2022-11-21 16:21:50 -05:00
|
|
|
mod quad_render;
|
2022-11-19 23:16:19 -05:00
|
|
|
mod render_target;
|
2022-11-19 23:16:57 -05:00
|
|
|
mod util;
|
2022-11-21 18:19:43 -05:00
|
|
|
pub mod error;
|
2022-11-14 00:14:05 -05:00
|
|
|
|
2022-11-26 16:47:48 -05:00
|
|
|
mod samplers;
|
|
|
|
|
2022-11-21 02:56:03 -05:00
|
|
|
pub use filter_chain::FilterChain;
|
|
|
|
pub use framebuffer::Framebuffer;
|
2022-11-21 16:21:50 -05:00
|
|
|
pub use framebuffer::GlImage;
|
|
|
|
pub use framebuffer::Viewport;
|
2022-11-21 02:56:03 -05:00
|
|
|
|
2022-11-22 01:56:39 -05:00
|
|
|
#[cfg(test)]
|
|
|
|
mod hello_triangle;
|
2022-11-27 02:10:11 -05:00
|
|
|
mod texture;
|
2022-11-27 23:27:21 -05:00
|
|
|
mod options;
|
2022-11-22 01:56:39 -05:00
|
|
|
|
2022-11-09 01:11:25 -05:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
2022-11-19 23:16:57 -05:00
|
|
|
use crate::filter_chain::FilterChain;
|
2022-11-09 01:11:25 -05:00
|
|
|
|
2022-11-11 21:52:22 -05:00
|
|
|
#[test]
|
2022-11-22 01:56:39 -05:00
|
|
|
fn triangle_gl() {
|
2022-11-11 21:52:22 -05:00
|
|
|
let (glfw, window, events, shader, vao) = hello_triangle::setup();
|
2022-11-21 16:21:50 -05:00
|
|
|
let mut filter =
|
2022-11-28 18:34:37 -05:00
|
|
|
FilterChain::load_from_path("../test/slang-shaders/crt/crt-royale.slangp", None)
|
2022-11-21 16:21:50 -05:00
|
|
|
.unwrap();
|
2022-11-19 23:16:57 -05:00
|
|
|
hello_triangle::do_loop(glfw, window, events, shader, vao, &mut filter);
|
2022-11-11 21:52:22 -05:00
|
|
|
}
|
2022-11-09 01:11:25 -05:00
|
|
|
}
|