1
0

Make it work with gcc/Clang on windows

This commit is contained in:
2025-03-30 20:07:31 +02:00
parent 487e487fb3
commit f91fc8bf56
15 changed files with 64 additions and 82 deletions

36
HelloVulkan/main.cpp Normal file
View File

@@ -0,0 +1,36 @@
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DPETH_ZERO_TO_ONE
#include <glm/vec4.hpp>
#include <glm/mat4x4.hpp>
#include <iostream>
int main ( ) {
glfwInit();
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
GLFWwindow* window = glfwCreateWindow(800,600, "Vulkan window", nullptr, nullptr);
uint32_t extensionCount = 0;
vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr);
std::cout << extensionCount << " extensions supported\n";
glm::mat4 matrix;
glm::vec4 vec;
auto test = matrix * vec;
while(!glfwWindowShouldClose(window)){
glfwPollEvents();
}
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}

8
HelloVulkan/premake5.lua Normal file
View File

@@ -0,0 +1,8 @@
require("premake", ">=5.0-beta2")
project "HelloVulkan"
files{
"**.cpp",
"**.h"
}