CPLYMeshFileLoader now switching to 32-bit meshbuffers when more than 65535 vertices instead of more than 65565.

Thanks @randomMesh for reporting (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52563)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6052 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2020-01-08 10:34:35 +00:00
parent 5db5cbadf5
commit bc41211482

@ -230,7 +230,7 @@ IAnimatedMesh* CPLYMeshFileLoader::createMesh(io::IReadFile* file)
if (continueReading)
{
// create a mesh buffer
CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65565 ? video::EIT_32BIT : video::EIT_16BIT);
CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65535 ? video::EIT_32BIT : video::EIT_16BIT);
mb->getVertexBuffer().reallocate(vertCount);
mb->getIndexBuffer().reallocate(vertCount);
mb->setHardwareMappingHint(EHM_STATIC);