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>
|
2019-04-09 02:02:43 +08:00
|
|
|
|
#include<hgl/type/List.h>
|
2019-04-10 01:13:31 +08:00
|
|
|
|
#include"Window.h"
|
2019-04-10 21:54:39 +08:00
|
|
|
|
#include"RenderSurface.h"
|
2019-04-09 00:22:26 +08:00
|
|
|
|
|
|
|
|
|
VK_NAMESPACE_BEGIN
|
|
|
|
|
class Instance
|
|
|
|
|
{
|
2019-04-10 01:13:31 +08:00
|
|
|
|
Window *win;
|
|
|
|
|
|
|
|
|
|
List<const char *> ext_list;
|
|
|
|
|
|
2019-04-09 00:22:26 +08:00
|
|
|
|
VkApplicationInfo app_info;
|
|
|
|
|
VkInstanceCreateInfo inst_info;
|
|
|
|
|
|
|
|
|
|
VkInstance inst;
|
|
|
|
|
|
2019-04-10 21:54:39 +08:00
|
|
|
|
List<VkPhysicalDevice> physical_devices;
|
2019-04-09 02:02:43 +08:00
|
|
|
|
|
2019-04-09 00:22:26 +08:00
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
UTF8String app_name;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2019-04-10 01:13:31 +08:00
|
|
|
|
Instance(const UTF8String &,Window *);
|
2019-04-09 00:22:26 +08:00
|
|
|
|
virtual ~Instance();
|
|
|
|
|
|
|
|
|
|
virtual bool Init();
|
2019-04-09 02:02:43 +08:00
|
|
|
|
|
2019-04-10 21:54:39 +08:00
|
|
|
|
const List<VkPhysicalDevice> & GetDeviceList()const{return physical_devices;}
|
2019-04-10 14:00:06 +08:00
|
|
|
|
|
2019-04-10 21:54:39 +08:00
|
|
|
|
RenderSurface *CreateRenderSurface(int pd_index=0);
|
2019-04-09 00:22:26 +08:00
|
|
|
|
};//class Instance
|
|
|
|
|
VK_NAMESPACE_END
|
|
|
|
|
#endif//HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
|