improved IBAccess in VKPrimitive/VKRenderable/MaterialRenderList
This commit is contained in:
parent
ad330f3a42
commit
11ebb841be
@ -53,7 +53,7 @@ public:
|
||||
bool GetVABAccess (const AnsiString &,VABAccess *);
|
||||
const int GetBufferCount ()const {return buffer_list.GetCount();}
|
||||
|
||||
const IBAccess * GetIBAccess ()const {return &ib_access;}
|
||||
const IBAccess * GetIBAccess ()const {return ib_access.buffer?&ib_access:nullptr;}
|
||||
};//class Primitive
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE
|
||||
|
@ -256,11 +256,9 @@ void MaterialRenderList::Render(RenderItem *ri)
|
||||
last_vid=ri->vid;
|
||||
}
|
||||
|
||||
const IBAccess *iba=last_vid->ib_access;
|
||||
|
||||
if(iba->buffer)
|
||||
if(last_vid->ib_access)
|
||||
{
|
||||
cmd_buf->DrawIndexed(iba,ri->count);
|
||||
cmd_buf->DrawIndexed(last_vid->ib_access,ri->count);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -15,6 +15,9 @@ VertexInputData::VertexInputData(const uint32_t c,const uint32_t vc,const IBAcce
|
||||
|
||||
vertex_count=vc;
|
||||
|
||||
if(!iba||!iba->buffer)
|
||||
ib_access=nullptr;
|
||||
else
|
||||
ib_access=iba;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user