5 #include <unordered_map> 62 bool finishInit() override final;
64 bool isInstanceLayerLoaded(const
char* name) const;
65 bool isInstanceExtensionLoaded(const
char* name) const;
66 bool isDeviceExtensionLoaded(const
char* name) const;
68 ::
lug::
Graphics::Render::Window* createWindow(Render::Window::
InitInfo& initInfo) override final;
69 ::
lug::
Graphics::Render::Window* getWindow() override final;
71 const API::Instance& getInstance() const;
72 API::Device& getDevice();
73 const API::Device& getDevice() const;
87 void addPipeline(
Resource::SharedPtr<Render::Pipeline> pipeline);
88 bool containsPipeline(Render::Pipeline::Id
id) const;
89 Resource::SharedPtr<Render::Pipeline> getPipeline(Render::Pipeline::Id
id);
91 Render::Window* getRenderWindow() const;
95 bool beginFrame(const
lug::System::Time& elapsedTime) override final;
96 bool endFrame() override final;
99 bool initInstance(const
std::
string& appName, const Core::Version& appVersion);
102 bool checkRequirementsInstance(const
std::set<
Module::
Type> &modulesToCheck);
103 bool checkRequirementsDevice(const
PhysicalDeviceInfo& physicalDeviceInfo, const
std::set<
Module::
Type> &modulesToCheck,
bool finalization,
bool quiet);
105 template <typename Info>
106 std::vector<const
char*> checkRequirementsLayers(const Info& info, const
std::vector<const
char*>& layers,
std::vector<const
char*>& layersFound);
108 template <typename Info>
109 std::vector<const
char*> checkRequirementsExtensions(const Info& info, const
std::vector<const
char*>& extensions,
std::vector<const
char*>& extensionsFound);
114 API::Instance _instance{};
119 std::vector<PhysicalDeviceInfo> _physicalDeviceInfos{};
121 VkDebugReportCallbackEXT _debugReportCallback{VK_NULL_HANDLE};
125 std::vector<const char*> _loadedInstanceLayers{};
126 std::vector<const char*> _loadedInstanceExtensions{};
127 std::vector<const char*> _loadedDeviceExtensions{};
128 VkPhysicalDeviceFeatures _loadedDeviceFeatures{};
129 std::vector<Render::Mesh*> _attachedMeshes{};
136 VK_PRESENT_MODE_MAILBOX_KHR,
137 VK_PRESENT_MODE_FIFO_KHR
140 VK_FORMAT_B8G8R8A8_UNORM,
141 VK_FORMAT_R8G8B8A8_UNORM
144 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR,
145 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
150 std::unordered_map<Render::Pipeline::Id, Resource::WeakPtr<Render::Pipeline>>
_pipelines;
Stores the version of the Application.
Class for loading a type of file.
const std::vector< const char * > optionalInstanceExtensions
const std::vector< const char * > mandatoryInstanceLayers
PhysicalDeviceInfo * device
const std::vector< const char * > optionalDeviceExtensions
std::vector< VkCompositeAlphaFlagBitsKHR > compositeAlphas
static const std::unordered_map< Module::Type, Requirements > modulesRequirements
const VkPhysicalDeviceFeatures mandatoryFeatures
std::vector< VkFormat > formats
std::unordered_map< Render::Pipeline::Id, Resource::WeakPtr< Render::Pipeline > > _pipelines
const std::vector< const char * > mandatoryDeviceExtensions
std::unique_ptr< Render::Window > _window
const VkPhysicalDeviceFeatures optionalFeatures
const std::vector< const char * > optionalInstanceLayers
const std::vector< const char * > mandatoryInstanceExtensions
std::vector< VkPresentModeKHR > presentModes