#if defined(__INTELLISENSE__) || !defined(USE_CPP20_MODULES) #include #else import vulkan_hpp; #endif #define GLFW_INCLUDE_VULKAN #include #include #include #include constexpr uint32_t WIDTH = 800; constexpr uint32_t HEIGHT = 600; class HelloTriangleApplication { public: void run() { initWindow(); initVulkan(); mainLoop(); cleanup(); } private: void initWindow() { glfwInit(); // Don't create an OpenGL context glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan", nullptr, nullptr); } void initVulkan() {} void mainLoop() { while (!glfwWindowShouldClose(window)) { glfwPollEvents(); } } void cleanup() { glfwDestroyWindow(window); glfwTerminate(); } GLFWwindow *window; }; int main() { HelloTriangleApplication app; try { app.run(); } catch (const std::exception &e) { std::cout << e.what() << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; }