传递MouseCoord到WorkObject

This commit is contained in:
2025-06-11 01:05:24 +08:00
parent 73027ffd9a
commit 3057fc7b6f
3 changed files with 26 additions and 7 deletions

View File

@@ -51,6 +51,8 @@ namespace hgl
graph::Camera * GetCamera (){return renderer->GetCamera();}
graph::CameraControl * GetCameraControl (){return render_framework->GetDefaultCameraControl();}
bool GetMouseCoord (Vector2i *mc)const{return render_framework->GetMouseCoord(mc);}
public:
const bool IsDestroy ()const{return destroy_flag;}
@@ -94,6 +96,14 @@ namespace hgl
return db->CreateMaterialInstance(mtl_name,mci,vil_cfg);
}
AutoDelete<graph::PrimitiveCreater> GetPrimitiveCreater(graph::Material *mtl)
{
if(!mtl)
return(nullptr);
return(new graph::PrimitiveCreater(GetDevice(),mtl->GetDefaultVIL()));
}
AutoDelete<graph::PrimitiveCreater> GetPrimitiveCreater(graph::MaterialInstance *mi)
{
if(!mi)