delete primitiveData at Destory(PrimitiveData *)
This commit is contained in:
parent
bf50333f5b
commit
c49feac2e6
@ -47,6 +47,32 @@ void Free(PrimitiveData *pd)
|
|||||||
delete pd;
|
delete pd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Destory(PrimitiveData *pd)
|
||||||
|
{
|
||||||
|
if(!pd)return;
|
||||||
|
|
||||||
|
VABAccess *vab=pd->vab_access;
|
||||||
|
|
||||||
|
for(uint32_t i=0;i<pd->vil->GetCount();i++)
|
||||||
|
{
|
||||||
|
if(vab->vab)
|
||||||
|
{
|
||||||
|
delete vab->vab;
|
||||||
|
vab->vab=nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
++vab;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pd->ib_access.buffer)
|
||||||
|
{
|
||||||
|
delete pd->ib_access.buffer;
|
||||||
|
pd->ib_access.buffer=nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete pd;
|
||||||
|
}
|
||||||
|
|
||||||
const VkDeviceSize GetVertexCount(PrimitiveData *pd)
|
const VkDeviceSize GetVertexCount(PrimitiveData *pd)
|
||||||
{
|
{
|
||||||
if(!pd)return(0);
|
if(!pd)return(0);
|
||||||
@ -118,30 +144,6 @@ VABAccess *GetVABAccess(PrimitiveData *pd,const AnsiString &name)
|
|||||||
// return vaba;
|
// return vaba;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
void Destory(PrimitiveData *pd)
|
|
||||||
{
|
|
||||||
if(!pd)return;
|
|
||||||
|
|
||||||
VABAccess *vab=pd->vab_access;
|
|
||||||
|
|
||||||
for(uint32_t i=0;i<pd->vil->GetCount();i++)
|
|
||||||
{
|
|
||||||
if(vab->vab)
|
|
||||||
{
|
|
||||||
delete vab->vab;
|
|
||||||
vab->vab=nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
++vab;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pd->ib_access.buffer)
|
|
||||||
{
|
|
||||||
delete pd->ib_access.buffer;
|
|
||||||
pd->ib_access.buffer=nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetIndexBuffer(PrimitiveData *pd,IndexBuffer *ib,const VkDeviceSize ic)
|
void SetIndexBuffer(PrimitiveData *pd,IndexBuffer *ib,const VkDeviceSize ic)
|
||||||
{
|
{
|
||||||
if(!pd)return;
|
if(!pd)return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user