Added RunFramework()

This commit is contained in:
2025-01-29 16:30:00 +08:00
parent a03770fd00
commit 7c745df910
2 changed files with 17 additions and 19 deletions

View File

@@ -58,4 +58,18 @@ namespace hgl
void Render(WorkObject *wo) override;
};
template<typename WO> int RunFramework(const OSString &title,uint width=1280,uint height=720)
{
graph::RenderFramework rf(title);
if(!rf.Init(width,height))
return(-1);
SwapchainWorkManager wm(&rf);
wm.Run(new WO(&rf));
return 0;
}
}//namespcae hgl