initial boilerplate commit
This commit is contained in:
commit
9872b960a5
4 changed files with 63 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Ignore build directory
|
||||
build/
|
||||
22
CMakeLists.txt
Normal file
22
CMakeLists.txt
Normal file
|
|
@ -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})
|
||||
3
README.md
Normal file
3
README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Yet Another Vulkan Engine.
|
||||
This project has been created with the sole purpose of teaching me how Vulkan
|
||||
works.
|
||||
36
VulkanTest.cpp
Normal file
36
VulkanTest.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#define GLFW_INCLUDE_VULKAN
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#define GLM_FORCE_RADIANS
|
||||
#define GLM_FORCE_DEPTH_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;
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue