From: cutealien Date: Tue, 19 Apr 2022 12:21:44 +0000 (+0000) Subject: CVertexBuffer no longer re-allocates stuff when type doesn't change X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c5ee8c83971a13861b98bbc75c6cac3c1e9741eb;p=irrlicht.git CVertexBuffer no longer re-allocates stuff when type doesn't change git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6339 dfc29bdd-3216-0410-991c-e03cc46cb475 --- diff --git a/include/CVertexBuffer.h b/include/CVertexBuffer.h index e382dc5..aa8049f 100644 --- a/include/CVertexBuffer.h +++ b/include/CVertexBuffer.h @@ -97,6 +97,9 @@ namespace scene void setType(video::E_VERTEX_TYPE vertexType) override { + if ( Vertices && Vertices->getType() == vertexType ) + return; + IVertexList *NewVertices=0; switch (vertexType)