2024-11-11 01:18:28 +08:00
|
|
|
#include<hgl/graph/RenderFramework.h>
|
2024-11-14 00:24:13 +08:00
|
|
|
#include<hgl/graph/module/RenderModule.h>
|
|
|
|
#include<hgl/graph/VKCommandBuffer.h>
|
|
|
|
#include<hgl/log/Logger.h>
|
2024-11-11 01:18:28 +08:00
|
|
|
|
|
|
|
using namespace hgl;
|
2024-11-12 01:51:14 +08:00
|
|
|
using namespace hgl::graph;
|
2024-11-11 01:18:28 +08:00
|
|
|
|
2024-11-14 00:24:13 +08:00
|
|
|
class TestRenderModule:public RenderModule
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RENDER_MODULE_CONSTRUCT(TestRenderModule)
|
|
|
|
|
|
|
|
void OnResize(const VkExtent2D &size) override
|
|
|
|
{
|
|
|
|
LOG_INFO(OS_TEXT("Resize: ")+OSString::numberOf(size.width)+OS_TEXT("x")+OSString::numberOf(size.height));
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnExecute(const double,RenderCmdBuffer *cmd)
|
|
|
|
{
|
|
|
|
LOG_INFO(OS_TEXT("Execute"));
|
|
|
|
|
|
|
|
//cmd->Begin
|
|
|
|
}
|
|
|
|
};//class TestGraphModule:public RenderModule
|
|
|
|
|
2024-11-11 01:18:28 +08:00
|
|
|
int os_main(int,os_char **)
|
|
|
|
{
|
2024-11-12 01:51:14 +08:00
|
|
|
RenderFramework rf;
|
2024-11-11 01:18:28 +08:00
|
|
|
|
2024-11-13 00:01:26 +08:00
|
|
|
if(!rf.Init(1280,720,OS_TEXT("FirstApp")))
|
|
|
|
return 1;
|
|
|
|
|
2024-11-14 00:24:13 +08:00
|
|
|
rf.AddModule<TestRenderModule>();
|
|
|
|
|
2024-11-13 00:01:26 +08:00
|
|
|
rf.Run();
|
|
|
|
|
|
|
|
return 0;
|
2024-11-11 01:18:28 +08:00
|
|
|
}
|