librashader/librashader-runtime-gl/src/lib.rs

39 lines
919 B
Rust
Raw Normal View History

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;
mod filter_chain;
2022-11-20 15:16:57 +11:00
mod filter_pass;
mod framebuffer;
2022-11-20 15:16:19 +11:00
mod render_target;
2022-11-20 15:16:57 +11:00
mod util;
pub mod error;
2022-11-14 16:14:05 +11:00
2022-11-27 08:47:48 +11:00
mod samplers;
2022-11-21 18:56:03 +11:00
pub use filter_chain::FilterChain;
2022-11-22 08:21:50 +11:00
pub use framebuffer::GlImage;
pub use framebuffer::Viewport;
2022-11-21 18:56:03 +11:00
2022-11-22 17:56:39 +11:00
#[cfg(test)]
2022-11-30 15:56:10 +11:00
mod gl3_hello_triangle;
2022-11-27 18:10:11 +11:00
mod texture;
mod options;
2022-11-30 15:56:10 +11:00
mod gl;
2022-11-22 17:56:39 +11:00
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
#[test]
2022-11-22 17:56:39 +11:00
fn triangle_gl() {
2022-11-30 15:56:10 +11:00
let (glfw, window, events, shader, vao) = gl3_hello_triangle::setup();
2022-11-22 08:21:50 +11:00
let mut filter =
2022-11-30 15:56:10 +11:00
FilterChain::load_from_path("../test/slang-shaders/vhs/VHSPro.slangp", None)
// FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
2022-11-22 08:21:50 +11:00
.unwrap();
2022-11-30 15:56:10 +11:00
gl3_hello_triangle::do_loop(glfw, window, events, shader, vao, &mut filter);
}
2022-11-09 17:11:25 +11:00
}