-
Notifications
You must be signed in to change notification settings - Fork 11
/
triangle.rs
51 lines (47 loc) · 1.85 KB
/
triangle.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
mod hello_triangle;
use librashader_runtime_gl::options::FilterChainOptionsGL;
use librashader_runtime_gl::FilterChainGL;
use std::sync::Arc;
#[test]
fn triangle_gl() {
let (glfw, window, events, shader, vao, context) = hello_triangle::gl3::setup();
unsafe {
let mut filter = FilterChainGL::load_from_path(
// "../test/basic.slangp",
"../test/shaders_slang/crt/crt-royale.slangp",
Arc::clone(&context),
Some(&FilterChainOptionsGL {
glsl_version: 0,
use_dsa: false,
force_no_mipmaps: false,
disable_cache: true,
}),
)
// FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
.expect("Failed to load filter chain");
hello_triangle::gl3::do_loop(&context, glfw, window, events, shader, vao, &mut filter);
}
}
#[test]
fn triangle_gl46() {
let (glfw, window, events, shader, vao, context) = hello_triangle::gl46::setup();
unsafe {
let mut filter = FilterChainGL::load_from_path(
// "../test/slang-shaders/vhs/VHSPro.slangp",
// "../test/slang-shaders/test/history.slangp",
// "../test/basic.slangp",
// "../test/shaders_slang/crt/crt-royale.slangp",
"../test/shaders_slang/crt/crt-royale.slangp",
Arc::clone(&context),
Some(&FilterChainOptionsGL {
glsl_version: 330,
use_dsa: true,
force_no_mipmaps: false,
disable_cache: false,
}),
)
// FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
.unwrap();
hello_triangle::gl46::do_loop(&context, glfw, window, events, shader, vao, &mut filter);
}
}