ULRE/inc/hgl/graph/vulkan/VKInstance.h

51 lines
1.6 KiB
C
Raw Normal View History

2019-04-09 00:22:26 +08:00
#ifndef HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
#define HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
#include<hgl/type/BaseString.h>
#include<hgl/type/List.h>
#include<hgl/platform/Window.h>
#include<hgl/graph/vulkan/VK.h>
2019-04-09 00:22:26 +08:00
VK_NAMESPACE_BEGIN
2019-04-18 22:10:24 +08:00
struct PhysicalDevice;
class Device;
2019-04-09 00:22:26 +08:00
class Instance
{
VkInstance inst;
List<VkLayerProperties> layer_properties;
List<VkExtensionProperties> extension_properties;
VkDebugUtilsMessengerEXT debug_messenger;
VkDebugReportCallbackEXT debug_report_callback;
CharPointerList ext_list;
ObjectList<PhysicalDevice> physical_devices;
2019-04-09 00:22:26 +08:00
private:
friend Instance *CreateInstance(const UTF8String &app_name);
Instance(VkInstance,CharPointerList &);
2019-04-09 00:22:26 +08:00
public:
virtual ~Instance();
VkInstance GetVkInstance () {return inst;}
const List<VkLayerProperties> & GetLayerProperties ()const {return layer_properties;}
const bool CheckLayerSupport (const UTF8String &)const;
const CharPointerList & GetExtList ()const {return ext_list;}
const ObjectList<PhysicalDevice> &GetDeviceList ()const {return physical_devices;}
const PhysicalDevice * GetDevice (VkPhysicalDeviceType)const;
2019-04-10 14:00:06 +08:00
2019-04-18 16:06:44 +08:00
Device * CreateRenderDevice (Window *,const PhysicalDevice *pd=nullptr);
2019-04-09 00:22:26 +08:00
};//class Instance
Instance *CreateInstance(const UTF8String &); ///<创建一个Vulkan实例
2019-04-09 00:22:26 +08:00
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_INSTANCE_INCLUDE