ULRE/example/Vulkan/VKInstance.h

40 lines
836 B
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"Window.h"
#include"RenderSurface.h"
2019-04-09 00:22:26 +08:00
VK_NAMESPACE_BEGIN
class Instance
{
Window *win;
List<const char *> ext_list;
2019-04-09 00:22:26 +08:00
VkApplicationInfo app_info;
VkInstanceCreateInfo inst_info;
VkInstance inst;
List<VkPhysicalDevice> physical_devices;
2019-04-09 00:22:26 +08:00
private:
UTF8String app_name;
public:
Instance(const UTF8String &,Window *);
2019-04-09 00:22:26 +08:00
virtual ~Instance();
virtual bool Init();
const List<VkPhysicalDevice> & GetDeviceList()const{return physical_devices;}
2019-04-10 14:00:06 +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