aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2022-04-19 12:21:44 +0000
committersfan5 <sfan5@live.de>2023-03-24 17:09:11 +0100
commitc5ee8c83971a13861b98bbc75c6cac3c1e9741eb (patch)
tree2a9bcdcf1dc55da9c230b9315ba269eda8af827c
parentb0c03b6f3b49e2c176df341bc1c3263701946be5 (diff)
downloadirrlicht-c5ee8c83971a13861b98bbc75c6cac3c1e9741eb.tar.xz
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
-rw-r--r--include/CVertexBuffer.h3
1 files changed, 3 insertions, 0 deletions
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)