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 *);
|
bool GetVABAccess (const AnsiString &,VABAccess *);
|
||||||
const int GetBufferCount ()const {return buffer_list.GetCount();}
|
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
|
};//class Primitive
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE
|
#endif//HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE
|
||||||
|
@ -256,11 +256,9 @@ void MaterialRenderList::Render(RenderItem *ri)
|
|||||||
last_vid=ri->vid;
|
last_vid=ri->vid;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IBAccess *iba=last_vid->ib_access;
|
if(last_vid->ib_access)
|
||||||
|
|
||||||
if(iba->buffer)
|
|
||||||
{
|
{
|
||||||
cmd_buf->DrawIndexed(iba,ri->count);
|
cmd_buf->DrawIndexed(last_vid->ib_access,ri->count);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,10 @@ VertexInputData::VertexInputData(const uint32_t c,const uint32_t vc,const IBAcce
|
|||||||
|
|
||||||
vertex_count=vc;
|
vertex_count=vc;
|
||||||
|
|
||||||
ib_access=iba;
|
if(!iba||!iba->buffer)
|
||||||
|
ib_access=nullptr;
|
||||||
|
else
|
||||||
|
ib_access=iba;
|
||||||
}
|
}
|
||||||
|
|
||||||
VertexInputData::~VertexInputData()
|
VertexInputData::~VertexInputData()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user