Added logging, refactored versioning; STB is now included

- Added logging
- Rewrote versioning code
- Refactored dependency management
  - STB (stb_image.h) is now included
  - All other dependencies now use find_package
- Cross-compilation from Linux to Windows is now possible
This commit is contained in:
2022-10-31 21:12:48 +03:00
parent da10f7c5cd
commit a110c9de03
21 changed files with 3217 additions and 198 deletions

View File

@@ -1,15 +1,19 @@
#include "vulkan_mgmt.h"
#include "../config.h"
#include "vulkan_common.h"
#include "vulkan_swap_chain.h"
#include "../../main/logging.h"
using namespace progressia::main::logging;
namespace progressia {
namespace desktop {
Vulkan *vulkan;
void initializeVulkan() {
std::cout << "Vulkan initializing" << std::endl;
debug("Vulkan initializing");
// Instance extensions
@@ -42,7 +46,7 @@ void initializeVulkan() {
vulkan = new Vulkan(instanceExtensions, deviceExtensions, validationLayers);
std::cout << "Vulkan initialized" << std::endl;
debug("Vulkan initialized");
}
Vulkan *getVulkan() { return vulkan; }
@@ -54,14 +58,14 @@ void endRender() { return vulkan->endRender(); }
void resizeVulkanSurface() { vulkan->getSwapChain().recreate(); }
void shutdownVulkan() {
std::cout << "Vulkan terminating" << std::endl;
debug("Vulkan terminating");
if (vulkan != nullptr) {
delete vulkan;
vulkan = nullptr;
}
std::cout << "Vulkan terminated" << std::endl;
debug("Vulkan terminated");
}
} // namespace desktop