Vulkan: Fix compile issues on Windows because of min/max.
This commit is contained in:
parent
46c6bd7eb4
commit
130942f578
@ -105,7 +105,7 @@ bool Context::init_win32(HINSTANCE hinstance, HWND hwnd, int preferred_device)
|
||||
auto win32_surface_create_info = vk::Win32SurfaceCreateInfoKHR{}
|
||||
.setHinstance(hinstance)
|
||||
.setHwnd(hwnd);
|
||||
surface = instance->createWin32SurfaceKHRUnique(win32_surface_create_info);
|
||||
surface = instance->createWin32SurfaceKHRUnique(win32_surface_create_info).value;
|
||||
if (!surface)
|
||||
return false;
|
||||
return init(preferred_device);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#endif
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include "vulkan/vulkan.hpp"
|
||||
#include "vulkan/vulkan_hpp_wrapper.hpp"
|
||||
#include "../external/VulkanMemoryAllocator-Hpp/include/vk_mem_alloc.hpp"
|
||||
#include "vulkan_swapchain.hpp"
|
||||
#include <memory>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#include "vulkan/vulkan.hpp"
|
||||
#include "vulkan_hpp_wrapper.hpp"
|
||||
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
4
vulkan/vulkan_hpp_wrapper.hpp
Normal file
4
vulkan/vulkan_hpp_wrapper.hpp
Normal file
@ -0,0 +1,4 @@
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include "vulkan/vulkan.hpp"
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "vulkan/vulkan.hpp"
|
||||
#include "vulkan/vulkan_hpp_wrapper.hpp"
|
||||
#include "slang_shader.hpp"
|
||||
#include "vulkan_context.hpp"
|
||||
#include "vulkan_pipeline_image.hpp"
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
#include "vulkan/vulkan_handles.hpp"
|
||||
#include "vulkan/vulkan_structs.hpp"
|
||||
#include "vulkan/vulkan_hpp_wrapper.hpp"
|
||||
#include <functional>
|
||||
|
||||
namespace Vulkan
|
||||
|
Loading…
Reference in New Issue
Block a user