mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 17:35:37 +02:00
Keep stats on hw buffer uploads
This commit is contained in:
@@ -266,6 +266,8 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
|
||||
const E_VERTEX_TYPE vType = mb->getVertexType();
|
||||
const u32 vertexSize = getVertexPitchFromType(vType);
|
||||
|
||||
accountHWBufferUpload(vertexSize * vertexCount);
|
||||
|
||||
const c8 *vbuf = static_cast<const c8 *>(vertices);
|
||||
core::array<c8> buffer;
|
||||
if (!FeatureAvailable[IRR_ARB_vertex_array_bgra] && !FeatureAvailable[IRR_EXT_vertex_array_bgra]) {
|
||||
@@ -367,6 +369,8 @@ bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
|
||||
}
|
||||
}
|
||||
|
||||
accountHWBufferUpload(indexCount * indexSize);
|
||||
|
||||
// get or create buffer
|
||||
bool newBuffer = false;
|
||||
if (!HWBuffer->vbo_indicesID) {
|
||||
|
Reference in New Issue
Block a user