Garnet
2 years ago
2 changed files with 30 additions and 0 deletions
@ -0,0 +1,5 @@ |
|||||||
|
project('vulkan learning', 'c') |
||||||
|
|
||||||
|
deps = [dependency('glfw3'), dependency('vulkan'), dependency('dl'), dependency('threads'), dependency('X11'), dependency('xxf86vm'), dependency('xrandr'), dependency('xi'), dependency('cglm')] |
||||||
|
|
||||||
|
executable('triangle', 'src/main.c', dependencies: deps) |
@ -0,0 +1,25 @@ |
|||||||
|
#define GLFW_INCLUDE_VULKAN |
||||||
|
#include <GLFW/glfw3.h> |
||||||
|
|
||||||
|
#include <stdio.h> |
||||||
|
|
||||||
|
int main() { |
||||||
|
glfwInit(); |
||||||
|
|
||||||
|
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); |
||||||
|
GLFWwindow* window = glfwCreateWindow(2560, 1440, "vulkan learning example", NULL, NULL); |
||||||
|
|
||||||
|
uint32_t num_extensions = 0; |
||||||
|
vkEnumerateInstanceExtensionProperties(NULL, &num_extensions, NULL); |
||||||
|
|
||||||
|
printf("number of supported extensions %Xh\n", num_extensions); |
||||||
|
|
||||||
|
while(!glfwWindowShouldClose(window)) { |
||||||
|
glfwPollEvents(); |
||||||
|
} |
||||||
|
|
||||||
|
glfwDestroyWindow(window); |
||||||
|
glfwTerminate(); |
||||||
|
|
||||||
|
return 0; |
||||||
|
} |
Loading…
Reference in new issue