Removed function to get enabled features, features can be set directly in derived constructor due to new explicit Vulkan initialization

This commit is contained in:
saschawillems 2016-12-14 21:38:45 +01:00
parent ca27585ee6
commit 401369f716
7 changed files with 44 additions and 47 deletions

View file

@ -79,8 +79,6 @@ public:
virtual VkPhysicalDeviceFeatures getEnabledFeatures()
{
VkPhysicalDeviceFeatures enabledFeatures{};
enabledFeatures.tessellationShader = VK_TRUE;
enabledFeatures.fillModeNonSolid = VK_TRUE;
return enabledFeatures;
}
@ -90,11 +88,11 @@ public:
rotation = glm::vec3(-20.0f, 45.0f, 0.0f);
enableTextOverlay = true;
title = "Vulkan Example - Tessellation shader displacement mapping";
// Support for tessellation shaders is optional, so check first
if (!deviceFeatures.tessellationShader)
{
vkTools::exitFatal("Selected GPU does not support tessellation shaders!", "Feature not supported");
}
// Enable physical device features required for this example
// Tell the driver that we are going to use geometry shaders
enabledFeatures.tessellationShader = VK_TRUE;
// Example also uses a wireframe pipeline, enable non-solid fill modes
enabledFeatures.fillModeNonSolid = VK_TRUE;
}
~VulkanExample()
@ -508,6 +506,12 @@ public:
void prepare()
{
// Check if device supports tessellation shaders
if (!deviceFeatures.tessellationShader)
{
vkTools::exitFatal("Selected GPU does not support tessellation shaders!", "Feature not supported");
}
VulkanExampleBase::prepare();
loadMeshes();
loadTextures();