added half codes.

This commit is contained in:
2023-03-29 21:34:50 +08:00
parent 49f37447d0
commit e488b4c3d3
3 changed files with 12 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ namespace hgl
{
using RenderableList=List<Renderable *>;
struct RenderableList
struct MaterialRenderableList
{
Material *mtl;

View File

@@ -26,7 +26,13 @@ public:
const VIL *GetVIL()const{return vil;}
MaterialParameters *GetMP(){return mp_per_mi;}
MaterialParameters *GetMP(const DescriptorSetType &type){return material->GetMP(type);}
MaterialParameters *GetMP(const DescriptorSetType &type)
{
if(type==DescriptorSetType::PerMaterial)
return mp_per_mi;
else
return material->GetMP(type);
}
bool BindUBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic=false);
bool BindSSBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic=false);