also this
This commit is contained in:
parent
01cdd533c5
commit
df6ec77374
13
src/main.cpp
13
src/main.cpp
|
@ -92,17 +92,14 @@ class HelloTriangleApplication {
|
||||||
.engineVersion = 1,
|
.engineVersion = 1,
|
||||||
.apiVersion = VK_API_VERSION_1_0 };
|
.apiVersion = VK_API_VERSION_1_0 };
|
||||||
|
|
||||||
vk::InstanceCreateInfo createInfo { .pApplicationInfo = &appInfo };
|
|
||||||
|
|
||||||
// Retrieve extensions using custom function
|
// Retrieve extensions using custom function
|
||||||
std::vector<const char*> extensions = getRequiredExtensions();
|
std::vector<const char*> extensions = getRequiredExtensions();
|
||||||
|
|
||||||
if (enableValidationLayers) {
|
vk::InstanceCreateInfo createInfo {
|
||||||
createInfo.setEnabledLayerCount(static_cast<uint32_t>(validationLayers.size()))
|
.pApplicationInfo = &appInfo,
|
||||||
.setPpEnabledLayerNames(validationLayers.data());
|
.enabledLayerCount = enableValidationLayers ? static_cast<uint32_t>(validationLayers.size()) : 0,
|
||||||
} else {
|
.ppEnabledLayerNames = enableValidationLayers ? validationLayers.data() : nullptr
|
||||||
createInfo.setEnabledLayerCount(0);
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// Enable the portability extension and set flags
|
// Enable the portability extension and set flags
|
||||||
extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
|
extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
|
||||||
|
|
Loading…
Reference in a new issue