From 845a3def3e40328106e209e4ef7b098ffb3e5164 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 14 Nov 2024 20:40:24 +0100 Subject: [PATCH] Mesh: Implement resize. --- src/Engine/RenderBackend/Mesh.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Engine/RenderBackend/Mesh.cpp b/src/Engine/RenderBackend/Mesh.cpp index efe9265de..1765c6c33 100644 --- a/src/Engine/RenderBackend/Mesh.cpp +++ b/src/Engine/RenderBackend/Mesh.cpp @@ -77,7 +77,11 @@ void Mesh::createVertexBuffer(void *vertices, size_t vbSize, BufferAccessType ac } void Mesh::resizeVertexBuffer(size_t vbSize) { - //todo! + if (mVertexBuffer == nullptr) { + return; + } + + mVertexBuffer->m_buffer.resize(vbSize); }