wrend 0.3.6

A WebGL2 rendering library for Rust/Wasm & JS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Safe wrapper around WebGL's fragment shader `i32`s
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum ShaderType {
    VertexShader,
    FragmentShader,
}

impl From<ShaderType> for u32 {
    fn from(shader_type: ShaderType) -> Self {
        match shader_type {
            ShaderType::VertexShader => 35_633,
            ShaderType::FragmentShader => 35_632,
        }
    }
}