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
// Generated by `scripts/generate_vk.js`

use utils::vk_traits::*;

pub type RawVkImageType = i32;

#[repr(i32)]
#[derive(Debug, PartialEq, Copy, Clone)]
pub enum VkImageType {
    _1d = 0,
    _2d = 1,
    _3d = 2,
}

impl VkRawType<VkImageType> for RawVkImageType {
    fn vk_to_wrapped(src: &RawVkImageType) -> VkImageType {
        unsafe {
            *((src as *const i32) as *const VkImageType)
        }
    }
}

impl VkWrappedType<RawVkImageType> for VkImageType {
    fn vk_to_raw(src: &VkImageType, dst: &mut RawVkImageType) {
        *dst = *src as i32
    }
}

impl Default for VkImageType {
    fn default() -> VkImageType {
        VkImageType::_1d
    }
}