mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): add buf data helper function
This commit is contained in:
parent
4a1b84ad57
commit
889395a79a
2 changed files with 11 additions and 0 deletions
|
|
@ -187,6 +187,15 @@ CGxBuf* GxBufCreate(CGxPool* pool, uint32_t itemSize, uint32_t itemCount, uint32
|
||||||
return g_theGxDevicePtr->BufCreate(pool, itemSize, itemCount, index);
|
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) {
|
char* GxBufLock(CGxBuf* buf) {
|
||||||
return g_theGxDevicePtr->BufLock(buf);
|
return g_theGxDevicePtr->BufLock(buf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ uint32_t GxVertexAttribOffset(EGxVertexBufferFormat, EGxVertexAttrib);
|
||||||
|
|
||||||
CGxBuf* GxBufCreate(CGxPool*, uint32_t, uint32_t, uint32_t);
|
CGxBuf* GxBufCreate(CGxPool*, uint32_t, uint32_t, uint32_t);
|
||||||
|
|
||||||
|
void GxBufData(CGxBuf* buf, const void* data, uint32_t size, uint32_t offset);
|
||||||
|
|
||||||
char* GxBufLock(CGxBuf* buf);
|
char* GxBufLock(CGxBuf* buf);
|
||||||
|
|
||||||
void GxBufUnlock(CGxBuf*, uint32_t);
|
void GxBufUnlock(CGxBuf*, uint32_t);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue