diff options
author | cutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475> | 2022-04-19 12:21:44 +0000 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-03-24 17:09:11 +0100 |
commit | c5ee8c83971a13861b98bbc75c6cac3c1e9741eb (patch) | |
tree | 2a9bcdcf1dc55da9c230b9315ba269eda8af827c | |
parent | b0c03b6f3b49e2c176df341bc1c3263701946be5 (diff) | |
download | irrlicht-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.h | 3 |
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)
|