Move ffi
module to separate file
This commit is contained in:
parent
66be063ce0
commit
2d8ded2111
2 changed files with 15 additions and 16 deletions
14
src/ffi.rs
Normal file
14
src/ffi.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
#![allow(non_upper_case_globals)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/glfw_vk_bindings.rs"));
|
||||
|
||||
pub fn VK_MAKE_VERSION(major: u32, minor: u32, patch: u32) -> u32 {
|
||||
(major << 22) | (minor << 12) | patch
|
||||
}
|
||||
|
||||
pub fn VK_MAKE_API_VERSION(variant: u32, major: u32, minor: u32, patch: u32) -> u32 {
|
||||
(variant << 29) | (major << 22) | (minor << 12) | patch
|
||||
}
|
17
src/main.rs
17
src/main.rs
|
@ -1,19 +1,4 @@
|
|||
mod ffi {
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/glfw_vk_bindings.rs"));
|
||||
|
||||
pub fn VK_MAKE_VERSION(major: u32, minor: u32, patch: u32) -> u32 {
|
||||
(major << 22) | (minor << 12) | patch
|
||||
}
|
||||
|
||||
pub fn VK_MAKE_API_VERSION(variant: u32, major: u32, minor: u32, patch: u32) -> u32 {
|
||||
(variant << 29) | (major << 22) | (minor << 12) | patch
|
||||
}
|
||||
}
|
||||
mod ffi;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::ffi::{CStr, CString};
|
||||
|
|
Loading…
Reference in a new issue