|
20 | 20 | // THE SOFTWARE. |
21 | 21 | // |
22 | 22 |
|
23 | | -#ifdef WIN32 |
24 | | - |
25 | | -#define NOMINMAX |
26 | | -#define WIN32_LEAN_AND_MEAN |
27 | | -#include <Windows.h> |
28 | | - |
29 | | -#define VK_USE_PLATFORM_WIN32_KHR |
30 | | -#include <vulkan/vulkan.h> |
31 | | - |
32 | | -#pragma warning(push, 4) |
33 | | -#pragma warning(disable: 4127) // warning C4127: conditional expression is constant |
34 | | -#pragma warning(disable: 4100) // warning C4100: '...': unreferenced formal parameter |
35 | | -#pragma warning(disable: 4189) // warning C4189: '...': local variable is initialized but not referenced |
36 | | -#define VMA_IMPLEMENTATION |
37 | | -#include "vk_mem_alloc.h" |
38 | | -#pragma warning(pop) |
39 | | - |
40 | | -#define MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT |
41 | | -#include <mathfu/glsl_mappings.h> |
42 | | -#include <mathfu/constants.h> |
43 | | - |
44 | | -#include <fstream> |
45 | | -#include <vector> |
46 | | -#include <string> |
47 | | -#include <memory> |
48 | | -#include <algorithm> |
49 | | -#include <numeric> |
50 | | -#include <array> |
51 | | -#include <type_traits> |
52 | | -#include <utility> |
53 | | - |
54 | | -#include <cmath> |
55 | | -#include <cassert> |
56 | | -#include <cstdlib> |
57 | | -#include <cstdio> |
58 | | - |
59 | | -#define ERR_GUARD_VULKAN(Expr) do { VkResult res__ = (Expr); if (res__ < 0) assert(0); } while(0) |
| 23 | +#ifdef _WIN32 |
| 24 | + |
| 25 | +#include "Tests.h" |
| 26 | +#include "VmaUsage.h" |
| 27 | +#include "Common.h" |
60 | 28 |
|
61 | 29 | static const char* const SHADER_PATH1 = "./"; |
62 | 30 | static const char* const SHADER_PATH2 = "../bin/"; |
63 | 31 | static const wchar_t* const WINDOW_CLASS_NAME = L"VULKAN_MEMORY_ALLOCATOR_SAMPLE"; |
64 | 32 | static const char* const VALIDATION_LAYER_NAME = "VK_LAYER_LUNARG_standard_validation"; |
65 | | -static const char* const APP_TITLE_A = "Vulkan Memory Allocator Sample 1.0"; |
66 | | -static const wchar_t* const APP_TITLE_W = L"Vulkan Memory Allocator Sample 1.0"; |
| 33 | +static const char* const APP_TITLE_A = "Vulkan Memory Allocator Sample 2.0"; |
| 34 | +static const wchar_t* const APP_TITLE_W = L"Vulkan Memory Allocator Sample 2.0"; |
67 | 35 |
|
68 | 36 | static const bool VSYNC = true; |
69 | 37 | static const uint32_t COMMAND_BUFFER_COUNT = 2; |
@@ -1689,14 +1657,12 @@ int main() |
1689 | 1657 | return 0; |
1690 | 1658 | } |
1691 | 1659 |
|
1692 | | -#else // #ifdef WIN32 |
| 1660 | +#else // #ifdef _WIN32 |
1693 | 1661 |
|
1694 | | -#define VMA_IMPLEMENTATION |
1695 | | -#include "vk_mem_alloc.h" |
| 1662 | +#include "VmaUsage.h" |
1696 | 1663 |
|
1697 | 1664 | int main() |
1698 | 1665 | { |
1699 | 1666 | } |
1700 | 1667 |
|
1701 | | -#endif // #ifdef WIN32 |
1702 | | - |
| 1668 | +#endif // #ifdef _WIN32 |
0 commit comments