浏览代码

FIX: gcc complains because binding a packed field to a normal reference is not permitted.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@707 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 15 年之前
父节点
当前提交
1748e38753
共有 1 个文件被更改,包括 12 次插入8 次删除
  1. 12 8
      code/OgreImporterMaterial.cpp

+ 12 - 8
code/OgreImporterMaterial.cpp

@@ -120,26 +120,30 @@ aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const
 									ss >> Line;
 									if(Line=="ambient")
 									{
-										aiColor3D Color;
-										ss >> Color.r >> Color.g >> Color.b;
+										float r,g,b;
+										ss >> r >> g >> b;
+										const aiColor3D Color(r,g,b);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_AMBIENT);
 									}
 									else if(Line=="diffuse")
 									{
-										aiColor3D Color;
-										ss >> Color.r >> Color.g >> Color.b;
+										float r,g,b;
+										ss >> r >> g >> b;
+										const aiColor3D Color(r,g,b);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_DIFFUSE);
 									}
 									else if(Line=="specular")
 									{
-										aiColor3D Color;
-										ss >> Color.r >> Color.g >> Color.b;
+										float r,g,b;
+										ss >> r >> g >> b;
+										const aiColor3D Color(r,g,b);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_SPECULAR);
 									}
 									else if(Line=="emmisive")
 									{
-										aiColor3D Color;
-										ss >> Color.r >> Color.g >> Color.b;
+										float r,g,b;
+										ss >> r >> g >> b;
+										const aiColor3D Color(r,g,b);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_EMISSIVE);
 									}
 									else if(Line=="texture_unit")