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

38 lines
1.0 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/VKPhysicalDevice.h>
2019-11-06 20:52:09 +08:00
#include<hgl/graph/vulkan/VKDebugOut.h>
2019-04-09 00:22:26 +08:00
VK_NAMESPACE_BEGIN
class Instance
{
VkInstance inst;
2019-11-06 20:52:09 +08:00
VKDebugOut *debug_out;
ObjectList<PhysicalDevice> physical_devices;
2019-04-09 00:22:26 +08:00
private:
friend Instance *CreateInstance(const UTF8String &app_name,VKDebugOut *out=nullptr);
2019-11-13 16:10:42 +08:00
Instance(VkInstance,VKDebugOut *);
2019-04-09 00:22:26 +08:00
public:
virtual ~Instance();
operator VkInstance (){return inst;}
const ObjectList<PhysicalDevice> &GetDeviceList ()const {return physical_devices;}
const PhysicalDevice * GetDevice (VkPhysicalDeviceType)const;
2019-04-09 00:22:26 +08:00
};//class Instance
Instance *CreateInstance(const UTF8String &,VKDebugOut *); ///<创建一个Vulkan实例
2019-04-09 00:22:26 +08:00
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_INSTANCE_INCLUDE