ULRE/inc/hgl/graph/RenderFramework.h

79 lines
2.1 KiB
C
Raw Normal View History

#pragma once
#include<hgl/platform/Window.h>
2025-01-25 21:17:00 +08:00
#include<hgl/graph/VKDevice.h>
#include<hgl/graph/VKCommandBuffer.h>
#include<hgl/graph/module/GraphModuleManager.h>
VK_NAMESPACE_BEGIN
class FontSource;
class TileFont;
class RenderPassManager;
class TextureManager;
class RenderTargetManager;
class SwapchainModule;
2025-01-19 19:42:38 +08:00
class RenderModule;
class RenderFramework:public io::WindowEvent
{
2025-01-19 19:42:38 +08:00
OSString app_name;
Window * win =nullptr;
VulkanInstance * inst =nullptr;
GPUDevice * device =nullptr;
RenderResource * render_resource =nullptr;
protected:
GraphModuleManager * module_manager =nullptr;
RenderPassManager * rp_manager =nullptr;
TextureManager * tex_manager =nullptr;
RenderTargetManager * rt_manager =nullptr;
SwapchainModule * sc_module =nullptr;
public:
2025-01-19 19:42:38 +08:00
Window * GetWindow (){return win;}
GPUDevice * GetDevice (){return device;}
GPUDeviceAttribute * GetDeviceAttribute (){return device->GetDeviceAttribute();}
RenderResource * GetRenderResource (){return render_resource;}
public:
2025-01-24 13:23:57 +08:00
GraphModuleManager * GetModuleManager (){return module_manager;}
RenderPassManager * GetRenderPassManager (){return rp_manager;}
TextureManager * GetTextureManager (){return tex_manager;}
RenderTargetManager * GetRenderTargetManager (){return rt_manager;}
SwapchainModule * GetSwapchainModule (){return sc_module;}
public:
RenderFramework(const OSString &);
virtual ~RenderFramework();
virtual bool Init(uint w,uint h);
public:
TileFont *CreateTileFont(FontSource *fs,int limit_count=-1); ///<创建只使用一种字符的Tile字符管理对象
public: // event
2025-01-19 19:42:38 +08:00
virtual void OnResize(uint w,uint h);
virtual void OnActive(bool);
virtual void OnClose();
};//class RenderFramework
VK_NAMESPACE_END