added MaterialInstance::WriteMIData<>(const T &)
This commit is contained in:
parent
2f00aa8e1e
commit
12e18b517b
@ -69,7 +69,7 @@ private:
|
|||||||
|
|
||||||
Color4f color=GetColor4f((COLOR)(i+int(COLOR::Blue)),1.0);
|
Color4f color=GetColor4f((COLOR)(i+int(COLOR::Blue)),1.0);
|
||||||
|
|
||||||
render_obj[i].mi->WriteMIData(color,sizeof(Color4f)); //设置MaterialInstance的数据
|
render_obj[i].mi->WriteMIData(color); //设置MaterialInstance的数据
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,9 @@ public:
|
|||||||
void * GetMIData (){return material->GetMIData(mi_id);} ///<取得材质实例数据
|
void * GetMIData (){return material->GetMIData(mi_id);} ///<取得材质实例数据
|
||||||
void WriteMIData (const void *data,const int size); ///<写入材质实例数据
|
void WriteMIData (const void *data,const int size); ///<写入材质实例数据
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void WriteMIData (const T &data){WriteMIData(&data,sizeof(T));} ///<写入材质实例数据
|
||||||
|
|
||||||
bool BindUBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic=false);
|
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);
|
bool BindSSBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic=false);
|
||||||
bool BindImageSampler(const DescriptorSetType &type,const AnsiString &name,Texture *tex,Sampler *sampler);
|
bool BindImageSampler(const DescriptorSetType &type,const AnsiString &name,Texture *tex,Sampler *sampler);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user