summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/code/OgreMaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/code/OgreMaterial.cpp')
-rw-r--r--src/3rdparty/assimp/code/OgreMaterial.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/3rdparty/assimp/code/OgreMaterial.cpp b/src/3rdparty/assimp/code/OgreMaterial.cpp
index f9da9d584..1abca2cf1 100644
--- a/src/3rdparty/assimp/code/OgreMaterial.cpp
+++ b/src/3rdparty/assimp/code/OgreMaterial.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2017, assimp team
+
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -77,7 +78,7 @@ void OgreImporter::ReadMaterials(const std::string &pFile, Assimp::IOSystem *pIO
aiMaterial *material = ReadMaterial(pFile, pIOHandler, submesh->materialRef);
if (material)
{
- submesh->materialIndex = materials.size();
+ submesh->materialIndex = static_cast<int>(materials.size());
materials.push_back(material);
}
}
@@ -93,13 +94,13 @@ void OgreImporter::ReadMaterials(const std::string &pFile, Assimp::IOSystem *pIO
// Create materials that can be found and parsed via the IOSystem.
for (size_t i=0, len=mesh->NumSubMeshes(); i<len; ++i)
{
- SubMeshXml *submesh = mesh->GetSubMesh(i);
+ SubMeshXml *submesh = mesh->GetSubMesh( static_cast<uint16_t>(i));
if (submesh && !submesh->materialRef.empty())
{
aiMaterial *material = ReadMaterial(pFile, pIOHandler, submesh->materialRef);
if (material)
{
- submesh->materialIndex = materials.size();
+ submesh->materialIndex = static_cast<int>(materials.size());
materials.push_back(material);
}
}
@@ -110,7 +111,7 @@ void OgreImporter::ReadMaterials(const std::string &pFile, Assimp::IOSystem *pIO
void OgreImporter::AssignMaterials(aiScene *pScene, std::vector<aiMaterial*> &materials)
{
- pScene->mNumMaterials = materials.size();
+ pScene->mNumMaterials = static_cast<unsigned int>(materials.size());
if (pScene->mNumMaterials > 0)
{
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
@@ -257,7 +258,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
ReadTechnique(Trim(techniqueName), ss, material);
}
- // Read informations from a custom material
+ // Read information from a custom material
/** @todo This "set $x y" does not seem to be a official Ogre material system feature.
Materials can inherit other materials and override texture units by using the (unique)
parent texture unit name in your cloned material.