Virtual function for enabling physical device features (instead of function pointer in constructor)

This commit is contained in:
saschawillems 2016-12-14 20:17:15 +01:00
parent d24f8ec8b7
commit 00ed23db98
5 changed files with 29 additions and 21 deletions

View file

@ -233,15 +233,15 @@ public:
VkSemaphore bindSparseSemaphore = VK_NULL_HANDLE;
// Device features to be enabled for this example
static VkPhysicalDeviceFeatures getEnabledFeatures()
virtual VkPhysicalDeviceFeatures getEnabledFeatures()
{
VkPhysicalDeviceFeatures enabledFeatures = {};
VkPhysicalDeviceFeatures enabledFeatures{};
enabledFeatures.shaderResourceResidency = VK_TRUE;
enabledFeatures.shaderResourceMinLod = VK_TRUE;
return enabledFeatures;
}
VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION, getEnabledFeatures)
VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION)
{
zoom = -1.3f;
rotation = { 76.25f, 0.0f, 0.0f };