mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-19 19:40:00 +03:00
feat(gx): add buf data helper function
This commit is contained in:
parent
4a1b84ad57
commit
889395a79a
@ -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);
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ uint32_t GxVertexAttribOffset(EGxVertexBufferFormat, EGxVertexAttrib);
|
||||
|
||||
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);
|
||||
|
||||
void GxBufUnlock(CGxBuf*, uint32_t);
|
||||
|
Loading…
Reference in New Issue
Block a user