CIndexBuffer no longer re-allocates stuff when type doesn't change

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6338 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2022-04-19 12:18:15 +00:00
parent fc1e2c3b91
commit 49616fd438

@ -110,11 +110,14 @@ namespace scene
} }
//virtual void setType(video::E_INDEX_TYPE IndexType); //virtual void setType(video::E_INDEX_TYPE IndexType);
virtual void setType(video::E_INDEX_TYPE IndexType) IRR_OVERRIDE virtual void setType(video::E_INDEX_TYPE indexType) IRR_OVERRIDE
{ {
if ( Indices && Indices->getType() == indexType )
return;
IIndexList *NewIndices=0; IIndexList *NewIndices=0;
switch (IndexType) switch (indexType)
{ {
case video::EIT_16BIT: case video::EIT_16BIT:
{ {