Explorar o código

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 %!s(int64=15) %!d(string=hai) anos
pai
achega
1748e38753
Modificáronse 1 ficheiros con 12 adicións e 8 borrados
  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;
 									ss >> Line;
 									if(Line=="ambient")
 									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);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_AMBIENT);
 									}
 									}
 									else if(Line=="diffuse")
 									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);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_DIFFUSE);
 									}
 									}
 									else if(Line=="specular")
 									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);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_SPECULAR);
 									}
 									}
 									else if(Line=="emmisive")
 									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);
 										NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_EMISSIVE);
 									}
 									}
 									else if(Line=="texture_unit")
 									else if(Line=="texture_unit")