Initial commit

This commit is contained in:
Pasha Bibko
2025-11-15 17:03:05 +00:00
commit 04ca0d1d69
8 changed files with 352 additions and 0 deletions

37
main.cpp Normal file
View File

@@ -0,0 +1,37 @@
#include <vulkan/vulkan.h>
#include <GLFW/glfw3.h>
#include <iostream>
int main()
{
/* Initializes GLFW and creates window */
if (!glfwInit())
{
std::cout << "Failed to initialize GLFW" << std::endl;
return -1;
}
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
const int WIDTH = 800;
const int HEIGHT = 600;
GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan Window", nullptr, nullptr);
if (!window)
{
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
/* Polls window events whilst it is still open */
while (!glfwWindowShouldClose(window))
{
glfwPollEvents();
}
/* Cleans up GLFW */
glfwDestroyWindow(window);
glfwTerminate();
}