Commit 008f14bc authored by cutealien's avatar cutealien

- Collada dae-loader now set's the vertex colors (thx @sf17k for report and test-models)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4727 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 0dbead25
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Collada dae-loader now set's the vertex colors (thx @sf17k for report and test-models)
- IAttributes interface changed. Parameters are now passed by const-ref instead of per value. - IAttributes interface changed. Parameters are now passed by const-ref instead of per value.
- Fix c::b project obj folder names. Some static builds had used the shared folders (thx @ gerdb for reporting) - Fix c::b project obj folder names. Some static builds had used the shared folders (thx @ gerdb for reporting)
- Add ITexture::getSource which can be used to check where the last IVideoDriver::getTexture call found the texture. - Add ITexture::getSource which can be used to check where the last IVideoDriver::getTexture call found the texture.
......
...@@ -124,7 +124,7 @@ namespace ...@@ -124,7 +124,7 @@ namespace
const core::stringc profileCOMMONAttributeName = "COMMON"; const core::stringc profileCOMMONAttributeName = "COMMON";
const char* const inputSemanticNames[] = {"POSITION", "VERTEX", "NORMAL", "TEXCOORD", const char* const inputSemanticNames[] = {"POSITION", "VERTEX", "NORMAL", "TEXCOORD",
"UV", "TANGENT", "IMAGE", "TEXTURE", 0}; "UV", "TANGENT", "IMAGE", "TEXTURE", "COLOR", 0};
// We have to read ambient lights like other light types here, so we need a type for it // We have to read ambient lights like other light types here, so we need a type for it
const video::E_LIGHT_TYPE ELT_AMBIENT = video::E_LIGHT_TYPE(video::ELT_COUNT+1); const video::E_LIGHT_TYPE ELT_AMBIENT = video::E_LIGHT_TYPE(video::ELT_COUNT+1);
...@@ -2192,6 +2192,15 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -2192,6 +2192,15 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
break; break;
case ECIS_TANGENT: case ECIS_TANGENT:
break; break;
case ECIS_COLOR:
{
video::SColorf col;
col.r = localInputs[k].Data[idx+0];
col.g = localInputs[k].Data[idx+1];
col.b = localInputs[k].Data[idx+2];
vtx.Color = col.toSColor();
break;
}
default: default:
break; break;
} }
...@@ -2326,6 +2335,15 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -2326,6 +2335,15 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
break; break;
case ECIS_TANGENT: case ECIS_TANGENT:
break; break;
case ECIS_COLOR:
{
video::SColorf col;
col.r = localInputs[k].Data[idx+0];
col.g = localInputs[k].Data[idx+1];
col.b = localInputs[k].Data[idx+2];
vtx.Color = col.toSColor();
break;
}
default: default:
break; break;
} }
......
...@@ -76,6 +76,7 @@ enum ECOLLADA_INPUT_SEMANTIC ...@@ -76,6 +76,7 @@ enum ECOLLADA_INPUT_SEMANTIC
ECIS_TANGENT, ECIS_TANGENT,
ECIS_IMAGE, ECIS_IMAGE,
ECIS_TEXTURE, ECIS_TEXTURE,
ECIS_COLOR,
ECIS_COUNT ECIS_COUNT
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment