2023-02-16 16:39:36 +11:00
|
|
|
mod hello_triangle;
|
|
|
|
|
|
|
|
use librashader_runtime_gl::options::FilterChainOptionsGL;
|
2023-02-17 09:33:47 +11:00
|
|
|
use librashader_runtime_gl::FilterChainGL;
|
2024-02-06 10:39:01 +11:00
|
|
|
use std::sync::Arc;
|
2023-02-16 16:39:36 +11:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn triangle_gl() {
|
2024-02-06 10:39:01 +11:00
|
|
|
let (glfw, window, events, shader, vao, context) = hello_triangle::gl3::setup();
|
2023-02-17 09:38:00 +11:00
|
|
|
|
|
|
|
unsafe {
|
|
|
|
let mut filter = FilterChainGL::load_from_path(
|
2024-02-06 10:39:01 +11:00
|
|
|
// "../test/basic.slangp",
|
2024-09-08 15:03:43 +10:00
|
|
|
"../test/shaders_slang/test/feedback.slangp",
|
2024-09-24 14:49:10 +10:00
|
|
|
Arc::clone(&context),
|
2023-02-17 09:38:00 +11:00
|
|
|
Some(&FilterChainOptionsGL {
|
|
|
|
glsl_version: 0,
|
|
|
|
use_dsa: false,
|
|
|
|
force_no_mipmaps: false,
|
|
|
|
disable_cache: false,
|
|
|
|
}),
|
|
|
|
)
|
2023-02-17 13:16:42 +11:00
|
|
|
// FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
|
|
|
|
.unwrap();
|
2024-02-06 10:39:01 +11:00
|
|
|
hello_triangle::gl3::do_loop(&context, glfw, window, events, shader, vao, &mut filter);
|
2023-02-17 09:38:00 +11:00
|
|
|
}
|
2023-02-16 16:39:36 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn triangle_gl46() {
|
2024-02-06 10:39:01 +11:00
|
|
|
let (glfw, window, events, shader, vao, context) = hello_triangle::gl46::setup();
|
2023-02-17 09:38:00 +11:00
|
|
|
unsafe {
|
|
|
|
let mut filter = FilterChainGL::load_from_path(
|
|
|
|
// "../test/slang-shaders/vhs/VHSPro.slangp",
|
|
|
|
// "../test/slang-shaders/test/history.slangp",
|
2024-02-06 10:39:01 +11:00
|
|
|
// "../test/basic.slangp",
|
2024-09-08 15:03:43 +10:00
|
|
|
// "../test/shaders_slang/crt/crt-royale.slangp",
|
|
|
|
"../test/shaders_slang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
2024-09-24 14:49:10 +10:00
|
|
|
Arc::clone(&context),
|
2023-02-17 09:38:00 +11:00
|
|
|
Some(&FilterChainOptionsGL {
|
2024-02-06 10:39:01 +11:00
|
|
|
glsl_version: 330,
|
2023-02-17 09:38:00 +11:00
|
|
|
use_dsa: true,
|
|
|
|
force_no_mipmaps: false,
|
|
|
|
disable_cache: false,
|
|
|
|
}),
|
|
|
|
)
|
2023-02-17 13:16:42 +11:00
|
|
|
// FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
|
|
|
|
.unwrap();
|
2024-02-06 10:39:01 +11:00
|
|
|
hello_triangle::gl46::do_loop(&context, glfw, window, events, shader, vao, &mut filter);
|
2023-02-17 09:38:00 +11:00
|
|
|
}
|
2023-02-17 09:33:47 +11:00
|
|
|
}
|