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
pub trait OutputTarget {
type Output;
}
pub struct GLSL;
pub struct HLSL;
pub struct SPIRV;
pub struct MSL;
pub struct DXIL;
impl OutputTarget for GLSL {
type Output = String;
}
impl OutputTarget for HLSL {
type Output = String;
}
impl OutputTarget for SPIRV {
type Output = Vec<u32>;
}
mod test {
use crate::back::targets::GLSL;
use crate::back::FromCompilation;
use crate::front::GlslangCompilation;
#[allow(dead_code)]
pub fn test_compile(value: GlslangCompilation) {
let _x = GLSL::from_compilation(value).unwrap();
}
}