@@ -8,7 +8,6 @@ use std::ffi::CString;
88use std:: ops:: Drop ;
99use std:: os:: fd:: { AsRawFd , FromRawFd , OwnedFd } ;
1010
11- const WLUMA_VERSION : u32 = vk:: make_api_version ( 0 , 4 , 6 , 1 ) ;
1211const VULKAN_VERSION : u32 = vk:: make_api_version ( 0 , 1 , 2 , 0 ) ;
1312
1413const FINAL_MIP_LEVEL : u32 = 4 ; // Don't generate mipmaps beyond this level - GPU is doing too poor of a job averaging the colors
@@ -37,11 +36,18 @@ pub struct Vulkan {
3736impl Vulkan {
3837 pub fn new ( ) -> Result < Self , Box < dyn Error > > {
3938 let app_name = CString :: new ( "wluma" ) ?;
39+ let app_version: u32 = vk:: make_api_version (
40+ 0 ,
41+ env ! ( "WLUMA_VERSION_MAJOR" ) . parse ( ) ?,
42+ env ! ( "WLUMA_VERSION_MINOR" ) . parse ( ) ?,
43+ env ! ( "WLUMA_VERSION_PATCH" ) . parse ( ) ?,
44+ ) ;
45+
4046 let app_info = vk:: ApplicationInfo :: default ( )
4147 . application_name ( & app_name)
42- . application_version ( WLUMA_VERSION )
48+ . application_version ( app_version )
4349 . engine_name ( & app_name)
44- . engine_version ( WLUMA_VERSION )
50+ . engine_version ( app_version )
4551 . api_version ( VULKAN_VERSION ) ;
4652
4753 let instance_extensions = & [
0 commit comments