Virtual function for enabling physical device features (instead of function pointer in constructor)
This commit is contained in:
parent
d24f8ec8b7
commit
00ed23db98
5 changed files with 29 additions and 21 deletions
|
|
@ -206,7 +206,7 @@ public:
|
|||
#endif
|
||||
|
||||
// Default ctor
|
||||
VulkanExampleBase(bool enableValidation, PFN_GetEnabledFeatures enabledFeaturesFn = nullptr);
|
||||
VulkanExampleBase(bool enableValidation);
|
||||
|
||||
// dtor
|
||||
~VulkanExampleBase();
|
||||
|
|
@ -233,6 +233,13 @@ public:
|
|||
*/
|
||||
virtual VkResult createInstance(bool enableValidation);
|
||||
|
||||
/**
|
||||
* Get physical device features to be enabled for this example
|
||||
*
|
||||
* @note Virtual, can be overriden by derived example class for custom instance creation
|
||||
*/
|
||||
virtual VkPhysicalDeviceFeatures getEnabledFeatures();
|
||||
|
||||
// Pure virtual render function (override in derived class)
|
||||
virtual void render() = 0;
|
||||
// Called when view change occurs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue