niko 0.1.8

the niko wasm game engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use glow;

#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum BufferType {
    VertexBuffer,
    IndexBuffer,
}

impl Into<u32> for BufferType {
    fn into(self) -> u32 {
        match self {
            BufferType::VertexBuffer => glow::ARRAY_BUFFER,
            BufferType::IndexBuffer => glow::ELEMENT_ARRAY_BUFFER,
        }
    }
}