Flatten vk.rs module structure and use f32

This commit is contained in:
Benjamin Saunders 2018-09-29 11:21:56 -07:00
parent c62172bdf8
commit d78afd87dd
2 changed files with 11690 additions and 11753 deletions

File diff suppressed because it is too large Load diff

View file

@ -619,7 +619,7 @@ fn name_to_tokens(type_name: &str) -> Ident {
"int" => "c_int",
"void" => "c_void",
"char" => "c_char",
"float" => "c_float",
"float" => "f32",
"long" => "c_ulong",
_ => {
if type_name.starts_with("Vk") {
@ -1700,10 +1700,6 @@ pub fn write_source_code(path: &Path) {
let source_code = quote!{
use std::fmt;
use std::os::raw::*;
#[doc(hidden)]
pub use self::extensions::*;
#[doc(hidden)]
pub use self::bitflags::*;
pub trait Handle {
const TYPE: ObjectType;
@ -1719,16 +1715,10 @@ pub fn write_source_code(path: &Path) {
#(#feature_code)*
#(#definition_code)*
#(#enum_code)*
pub mod bitflags {
use super::*;
#(#bitflags_code)*
}
#(#bitflags_code)*
#(#constants_code)*
pub mod extensions {
use super::*;
#(#extension_code)*
#feature_extensions_code
}
#(#extension_code)*
#feature_extensions_code
#const_displays
};
write!(&mut file, "{}", source_code).expect("Unable to write to file");