16 #include <vsg/vk/PhysicalDevice.h>
36 template<
typename FeatureStruct, VkStructureType type>
39 if (
auto itr = _features.find(type); itr != _features.end())
return *
reinterpret_cast<FeatureStruct*
>(itr->second);
41 FeatureStruct* feature =
new FeatureStruct{};
43 feature->sType = type;
44 feature->pNext =
nullptr;
54 VkPhysicalDeviceFeatures&
get();
69 VkStructureType sType;
73 std::map<VkStructureType, FeatureHeader*> _features;
Definition: DeviceFeatures.h:24
void clear()
clear all the feature structures
VkPhysicalDeviceFeatures & get()
FeatureStruct & get()
Definition: DeviceFeatures.h:37