Flatten vk.rs module structure and use f32
This commit is contained in:
parent
c62172bdf8
commit
d78afd87dd
23425
ash/src/vk.rs
23425
ash/src/vk.rs
File diff suppressed because it is too large
Load diff
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue