mirror of
https://github.com/minetest/irrlicht.git
synced 2025-01-12 10:50:31 +01:00
Switch to 32bit meshes in CPLYMeshFileLoader now at > 65536 vertices.
65536th vertex has index 65535 which is still fine, was going 1 too low in last commit. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6053 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
bc41211482
commit
5451a2a8a0
@ -1,5 +1,6 @@
|
|||||||
--------------------------
|
--------------------------
|
||||||
Changes in 1.9 (not yet released)
|
Changes in 1.9 (not yet released)
|
||||||
|
- Fix CPLYMeshFileLoader checking for wrong vertex count when switching between 16/32 bit. Thanks @randomMesh for reporting.
|
||||||
- Fix bug that AnimatedMeshSceneNode ignored ReadOnlyMaterials flag when checking materials for transparent render passes.
|
- Fix bug that AnimatedMeshSceneNode ignored ReadOnlyMaterials flag when checking materials for transparent render passes.
|
||||||
- Unify checks if materials should use transparent render pass with new IVideoDriver::needsTransparentRenderPass function.
|
- Unify checks if materials should use transparent render pass with new IVideoDriver::needsTransparentRenderPass function.
|
||||||
- Material.ZWriteEnable is now of type E_ZWRITE instead of bool. This allows now setting materials to always "on" independent of material type and transparency.
|
- Material.ZWriteEnable is now of type E_ZWRITE instead of bool. This allows now setting materials to always "on" independent of material type and transparency.
|
||||||
|
@ -230,7 +230,7 @@ IAnimatedMesh* CPLYMeshFileLoader::createMesh(io::IReadFile* file)
|
|||||||
if (continueReading)
|
if (continueReading)
|
||||||
{
|
{
|
||||||
// create a mesh buffer
|
// create a mesh buffer
|
||||||
CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65535 ? video::EIT_32BIT : video::EIT_16BIT);
|
CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65536 ? video::EIT_32BIT : video::EIT_16BIT);
|
||||||
mb->getVertexBuffer().reallocate(vertCount);
|
mb->getVertexBuffer().reallocate(vertCount);
|
||||||
mb->getIndexBuffer().reallocate(vertCount);
|
mb->getIndexBuffer().reallocate(vertCount);
|
||||||
mb->setHardwareMappingHint(EHM_STATIC);
|
mb->setHardwareMappingHint(EHM_STATIC);
|
||||||
|
Loading…
Reference in New Issue
Block a user