commit 9872b960a579fff592d296a23745c24816aa0ad4 Author: Warwick Date: Sat Oct 29 12:39:46 2022 +0100 initial boilerplate commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6b9d55 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore build directory +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..91d3c68 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.16) +project(yave) #Yet Another Vulkan Engine + +set(CMAKE_CXX_STANDARD 17) + +find_package(Vulkan REQUIRED) +find_package(glfw3 REQUIRED) +set(GLFW_LIBRARIES glfw) +find_package(glm REQUIRED) + +include_directories( + ${Vulkan_INCLUDE_DIRS} + ${GLFW_INCLUDE_DIRS} + ${GLM_INCLUDE_DIRS} + ) + +add_executable(${PROJECT_NAME} VulkanTest.cpp) + +target_link_libraries(${PROJECT_NAME} PUBLIC + ${GLFW_LIBRARIES} + ${Vulkan_LIBRARIES} + ${GLM_LIBRARY_DIRS}) diff --git a/README.md b/README.md new file mode 100644 index 0000000..d600899 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Yet Another Vulkan Engine. +This project has been created with the sole purpose of teaching me how Vulkan +works. diff --git a/VulkanTest.cpp b/VulkanTest.cpp new file mode 100644 index 0000000..d207a63 --- /dev/null +++ b/VulkanTest.cpp @@ -0,0 +1,36 @@ +#define GLFW_INCLUDE_VULKAN +#include + +#define GLM_FORCE_RADIANS +#define GLM_FORCE_DEPTH_ZERO_TO_ONE +#include +#include + +#include + +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; +} +