Skip to content

Commit

Permalink
Fix definition errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjaltesorgenfrei committed Feb 16, 2023
1 parent 0eb0167 commit 59a10a8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ add_executable(vulkanologi

add_compile_definitions(VULKAN_HPP_NO_STRUCT_CONSTRUCTORS) # Version 145 at least
target_precompile_headers(vulkanologi PRIVATE ${Vulkan_INCLUDE_DIRS}/vulkan/vulkan.hpp ext/glm/glm/glm.hpp)
target_precompile_headers(vulkanologi PRIVATE src/BehDevice.h)
target_precompile_headers(vulkanologi PRIVATE src/BehDevice.h src/WindowWrapper.h)

target_link_libraries(vulkanologi glfw glm tinyobjloader VulkanMemoryAllocator Vulkan::Vulkan)
add_shader(vulkanologi shader.frag)
Expand Down
12 changes: 9 additions & 3 deletions src/BehDevice.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#pragma once
#ifndef BEHDEVICE_H
#define BEHDEVICE_H
#pragma once

#include "WindowWrapper.h"
#include "BehVkTypes.h"
#include "Deletionqueue.h"
#include <vulkan/vulkan.hpp>
#include <iostream>
#include <map>
#include <optional>
#include <set>
#include "BehVkTypes.h"
#include "Deletionqueue.h"
#include <memory>


#ifdef NDEBUG
const bool enableValidationLayers = false;
Expand Down Expand Up @@ -117,3 +121,5 @@ class BehDevice {
const std::vector<const char*> deviceExtensions = {
VK_KHR_SWAPCHAIN_EXTENSION_NAME};
};

#endif
7 changes: 6 additions & 1 deletion src/WindowWrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#pragma once
#ifndef WINDOWWRAPPER_H
#define WINDOWWRAPPER_H
#pragma once

#include <utility>

#define GLFW_INCLUDE_VULKAN
Expand All @@ -22,3 +25,5 @@ class WindowWrapper {
[[nodiscard]] bool isFullScreen();
void setTitle(const char* title);
};

#endif

0 comments on commit 59a10a8

Please sign in to comment.