used vab source from MaterialInstance instead of Pipeline.

This commit is contained in:
hyzboy 2022-01-07 16:25:13 +08:00
parent be668ea2ec
commit ec7194ee13

View File

@ -34,9 +34,9 @@ RenderableInstance::~RenderableInstance()
RenderableInstance *CreateRenderableInstance(Renderable *r,MaterialInstance *mi,Pipeline *p)
{
if(!r||!p)return(nullptr);
if(!r||!mi||!p)return(nullptr);
const VAB *vab=p->GetVAB();
const VAB *vab=mi->GetVAB();
const int input_count=vab->GetVertexAttrCount();
const UTF8String &mtl_name=mi->GetMaterial()->GetName();