parent
3ddf9bf6dd
commit
29e2aac690
4 changed files with 98 additions and 2 deletions
@ -0,0 +1,7 @@ |
||||
project('vulkan test', 'c') |
||||
|
||||
sdl2_dep = dependency('vulkan') |
||||
|
||||
e = executable('vulkanprog', 'vulkanprog.c', dependencies : sdl2_dep) |
||||
|
||||
test('vulkantest', e) |
@ -0,0 +1,35 @@ |
||||
#include <vulkan/vulkan.h> |
||||
#include <stdio.h> |
||||
|
||||
int main() |
||||
{ |
||||
VkApplicationInfo application_info = { |
||||
VK_STRUCTURE_TYPE_APPLICATION_INFO, |
||||
NULL, |
||||
"sway", |
||||
VK_MAKE_VERSION(1,0,0), |
||||
"wlroots", |
||||
VK_MAKE_VERSION(1,0,0), |
||||
VK_MAKE_VERSION(1,0,0) |
||||
}; |
||||
|
||||
VkInstanceCreateInfo instance_create_info = { |
||||
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, |
||||
NULL, |
||||
0, |
||||
&application_info, |
||||
0, |
||||
NULL, |
||||
0, |
||||
NULL, |
||||
}; |
||||
|
||||
VkInstance instance; |
||||
VkResult ret = vkCreateInstance(&instance_create_info, NULL, &instance); |
||||
if(ret != VK_SUCCESS) { |
||||
printf("Could not create vulkan instance: %d\n", ret); |
||||
return ret; |
||||
} |
||||
|
||||
return 0;
|
||||
} |
Loading…
Reference in new issue