From fa5d86e42b62ba3502bbb00f0095e9ed69a94e4e Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 1 Jun 2018 18:42:18 +0200 Subject: [PATCH] Allow base class instance Vulkan version override --- base/vulkanexamplebase.cpp | 2 +- base/vulkanexamplebase.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index 0a7483ce..ff41a5b8 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -23,7 +23,7 @@ VkResult VulkanExampleBase::createInstance(bool enableValidation) appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; appInfo.pApplicationName = name.c_str(); appInfo.pEngineName = name.c_str(); - appInfo.apiVersion = VK_API_VERSION_1_0; + appInfo.apiVersion = apiVersion; std::vector instanceExtensions = { VK_KHR_SURFACE_EXTENSION_NAME }; diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index efe7978d..faeaafc6 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -185,6 +185,7 @@ public: std::string title = "Vulkan Example"; std::string name = "vulkanExample"; + uint32_t apiVersion = VK_API_VERSION_1_0; struct {