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

@ -44,17 +44,11 @@
#include "vulkantextoverlay.hpp"
#include "camera.hpp"
// Function pointer for getting physical device fetures to be enabled
typedef VkPhysicalDeviceFeatures (*PFN_GetEnabledFeatures)();
class VulkanExampleBase
{
private:
// Set to true if v-sync will be forced for the swapchain
bool enableVSync = false;
// Device features enabled by the example
// If not set, no additional features are enabled (may result in validation layer errors)
VkPhysicalDeviceFeatures enabledFeatures = {};
// fps timer (one second interval)
float fpsTimer = 0.0f;
// Get window title with example name, device, et.
@ -81,10 +75,16 @@ protected:
VkPhysicalDevice physicalDevice;
// Stores physical device properties (for e.g. checking device limits)
VkPhysicalDeviceProperties deviceProperties;
// Stores phyiscal device features (for e.g. checking if a feature is available)
// Stores the features available on the selected physical device (for e.g. checking if a feature is available)
VkPhysicalDeviceFeatures deviceFeatures;
// Stores all available memory (type) properties for the physical device
VkPhysicalDeviceMemoryProperties deviceMemoryProperties;
/**
* Set of physical device features to be enabled for this example (must be set in the derived constructor)
*
* @note By default no phyiscal device features are enabled
*/
VkPhysicalDeviceFeatures enabledFeatures{};
/** @brief Logical device, application's view of the physical device (GPU) */
// todo: getter? should always point to VulkanDevice->device
VkDevice device;
@ -233,13 +233,6 @@ 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