Message 1 of 1
Get shader name for face?

Not applicable
09-19-2012
08:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there, I'm writing an exporter and I need to get the material name for each face. Does anyone know the simplest way to do this, i have the poly iterator like this:
Thanks!
while (!iter_polys.isDone())
{
out_file << "f ";
unsigned int vert_count = iter_polys.polygonVertexCount();
for (unsigned int i = 0; i < vert_count; i++)
{
int uv_index;
iter_polys.getUVIndex(i, uv_index);
out_file << (iter_polys.vertexIndex(i) + 1) << "/" << (uv_index + 1) << "/" << (iter_polys.normalIndex(i) + 1) << " ";
}
out_file << "\n";
iter_polys.next();
}
Thanks!