Initial support of multi-materials per group.

Introduce material_id attribute per face.
This commit is contained in:
Syoyo Fujita
2014-09-13 23:49:25 +09:00
parent 33cd9a4768
commit cbba0a807e
3 changed files with 20 additions and 17 deletions

View File

@@ -40,14 +40,15 @@ typedef struct
std::vector<float> normals;
std::vector<float> texcoords;
std::vector<unsigned int> indices;
std::vector<int> material_ids; // per-mesh material ID
} mesh_t;
typedef struct
{
std::string name;
mesh_t mesh;
std::vector< std::pair<int, int> > submeshes;
std::vector< int > materials;
//std::vector< std::pair<int, int> > submeshes;
//std::vector< int > materials;
} shape_t;
class MaterialReader