Add RenderDevice struct and driver accessor functions

This commit is contained in:
2025-03-15 18:01:57 +10:00
parent d91275c393
commit f979b782cc
4 changed files with 66 additions and 0 deletions

View File

@@ -20,16 +20,21 @@ namespace Nova {
[[nodiscard]] RenderAPI get_api() const override;
[[nodiscard]] u32 get_api_version() const override;
[[nodiscard]] u32 get_device_count() const override;
[[nodiscard]] const RenderDevice& get_device(u32 index) const override;
private:
VkInstance m_instance = VK_NULL_HANDLE;
std::vector<const char*> m_extensions;
std::vector<const char*> m_layers;
std::vector<RenderDevice> m_devices;
void _check_version() const;
void _check_extensions();
void _check_layers();
void _init_instance();
void _init_devices();
static VkAllocationCallbacks* _get_allocator(VkObjectType type);
};