diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..810c19b --- /dev/null +++ b/meson.build @@ -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) diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..4e73a07 --- /dev/null +++ b/src/main.c @@ -0,0 +1,25 @@ +#define GLFW_INCLUDE_VULKAN +#include + +#include + +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; +}