Ogre: VertexAttributs from SharedGeometry are now loaded correctly; Material Loading is more robustly
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1193 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/5/head
parent
005887f381
commit
830388ab90
|
@ -282,6 +282,9 @@ aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const
|
||||||
|
|
||||||
void OgreImporter::ReadTechnique(stringstream &ss, aiMaterial* NewMaterial)
|
void OgreImporter::ReadTechnique(stringstream &ss, aiMaterial* NewMaterial)
|
||||||
{
|
{
|
||||||
|
string RestOfLine;
|
||||||
|
getline(ss, RestOfLine);//ignore the rest of the line
|
||||||
|
|
||||||
string Line;
|
string Line;
|
||||||
ss >> Line;
|
ss >> Line;
|
||||||
if(Line!="{")
|
if(Line!="{")
|
||||||
|
@ -294,6 +297,8 @@ void OgreImporter::ReadTechnique(stringstream &ss, aiMaterial* NewMaterial)
|
||||||
ss >> Line;
|
ss >> Line;
|
||||||
if(Line=="pass")
|
if(Line=="pass")
|
||||||
{
|
{
|
||||||
|
getline(ss, RestOfLine);//ignore the rest of the line
|
||||||
|
|
||||||
ss >> Line;
|
ss >> Line;
|
||||||
if(Line!="{")
|
if(Line!="{")
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,6 +163,14 @@ void OgreImporter::ReadSubMesh(SubMesh &theSubMesh, XmlReader *Reader)
|
||||||
we just use a reference to a submodel instead of our submodel itself*/
|
we just use a reference to a submodel instead of our submodel itself*/
|
||||||
|
|
||||||
SubMesh& VertexSource= bSharedData ? m_SharedGeometry : theSubMesh;
|
SubMesh& VertexSource= bSharedData ? m_SharedGeometry : theSubMesh;
|
||||||
|
if(bSharedData)//copy vertexinformations to our mesh:
|
||||||
|
{
|
||||||
|
theSubMesh.HasPositions=m_SharedGeometry.HasPositions;
|
||||||
|
theSubMesh.HasNormals=m_SharedGeometry.HasNormals;
|
||||||
|
theSubMesh.HasTangents=m_SharedGeometry.HasTangents;
|
||||||
|
theSubMesh.NumUvs=m_SharedGeometry.NumUvs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(VertexSource.NumUvs > 0)
|
if(VertexSource.NumUvs > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue