feat(gx): add buf data helper function

This commit is contained in:
fallenoak 2023-04-06 15:00:16 -05:00
parent 4a1b84ad57
commit 889395a79a
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
2 changed files with 11 additions and 0 deletions

View file

@ -187,6 +187,15 @@ CGxBuf* GxBufCreate(CGxPool* pool, uint32_t itemSize, uint32_t itemCount, uint32
return g_theGxDevicePtr->BufCreate(pool, itemSize, itemCount, index);
}
void GxBufData(CGxBuf* buf, const void* data, uint32_t size, uint32_t offset) {
if (size == 0) {
size = buf->m_itemSize * buf->m_itemCount;
}
g_theGxDevicePtr->BufData(buf, data, size, offset);
buf->unk1C = 1;
}
char* GxBufLock(CGxBuf* buf) {
return g_theGxDevicePtr->BufLock(buf);
}