commit e0dd5b6c1798f2bcb9d888c1ca2bdfff8082e4b5 Author: wullie Date: Thu Dec 4 18:26:10 2025 +0000 Upload files to "/" diff --git a/glfwVulkan.c b/glfwVulkan.c new file mode 100644 index 0000000..f08b511 --- /dev/null +++ b/glfwVulkan.c @@ -0,0 +1,45 @@ +#include +#include +#include + +const uint32_t WIDTH = 1920; +const uint32_t HEIGHT = 1080; +GLFWwindow* window = NULL; + +const char test[] = "window"; + +void initWindow(){ + glfwInit(); + + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); + + window = glfwCreateWindow(WIDTH, HEIGHT, test, nullptr, nullptr); + +} +void initVulkan(){ + +} + +void mainLoop(){ + while(!glfwWindowShouldClose(window)){ + glfwPollEvents(); + } + +} +void cleanUp(){ + glfwDestroyWindow(window); + glfwTerminate(); +} + +void run(){ + initWindow(); + initVulkan(); + mainLoop(); + cleanUp(); +} + +int main(){ + run(); + return 0; +} diff --git a/main.c b/main.c new file mode 100644 index 0000000..c8f61f7 --- /dev/null +++ b/main.c @@ -0,0 +1,28 @@ +#include +#include + +int main(){ + VkInstance instance; + VkInstanceCreateInfo createInfo = {}; + createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + + if(vkCreateInstance(&createInfo, NULL, &instance) !=VK_SUCCESS){ + printf("Failed to create Vulkan\n"); + return -1; + } + + uint32_t extensionCount = 0; + vkEnumerateInstanceExtensionProperties(NULL, &extensionCount, NULL); + + VkExtensionProperties extensions[extensionCount]; + vkEnumerateInstanceExtensionProperties(NULL, &extensionCount, extensions); + + + printf("Available extensions:\n"); + for (uint32_t i = 0; i < extensionCount; i++) { + printf("\t%s\n", extensions[i].extensionName); + } + + vkDestroyInstance(instance, NULL); + return 0; +}