quick backup of the renderer - things missing
[demo] / src / scene.cc
index 08689f6..c640847 100644 (file)
@@ -145,12 +145,10 @@ static Mesh *load_mesh(const aiScene *scene, unsigned int index)
        }
 
        mesh->name = std::string(amesh->mName.data);
-       mesh->which_mask = 0;
 
        for(unsigned int i=0; i<amesh->mNumVertices; ++i) {
                /* vertices */
                if(amesh->HasPositions()) {
-                       mesh->which_mask |= MESH_VERTEX;
                        Vec3 vertex = Vec3(amesh->mVertices[i].x, amesh->mVertices[i].y,
                                           amesh->mVertices[i].z);
 
@@ -164,7 +162,6 @@ static Mesh *load_mesh(const aiScene *scene, unsigned int index)
 
                /* normals */
                if(amesh->HasNormals()) {
-                       mesh->which_mask |= MESH_NORMAL;
                        Vec3 normal = Vec3(amesh->mNormals[i].x, amesh->mNormals[i].y,
                                           amesh->mNormals[i].z);
                        mesh->normals.push_back(normal);
@@ -177,7 +174,6 @@ static Mesh *load_mesh(const aiScene *scene, unsigned int index)
 
                /* texture coordinates */
                if(amesh->mTextureCoords[0]) {
-                       mesh->which_mask |= MESH_TEXTURE;
                        Vec2 tex_coord = Vec2(amesh->mTextureCoords[0][i].x, amesh->mTextureCoords[0][i].y);
                        mesh->tex_coords.push_back(tex_coord);
                }
@@ -186,19 +182,18 @@ static Mesh *load_mesh(const aiScene *scene, unsigned int index)
                }
 
                /* tangents */
-               if(amesh->mTangents) {
-                       mesh->which_mask |= MESH_TANGENT;
-                       Vec3 tangent = Vec3(amesh->mTangents[i].x, amesh->mTangents[i].y,
-                                           amesh->mTangents[i].z);
-                       mesh->tangents.push_back(tangent);
-               }
-               else {
-                       mesh->tangents.push_back(Vec3(1, 0, 0));
-               }
+               // if(amesh->mTangents) {
+               //      mesh->which_mask |= MESH_TANGENT;
+               //      Vec3 tangent = Vec3(amesh->mTangents[i].x, amesh->mTangents[i].y,
+               //                          amesh->mTangents[i].z);
+               //      mesh->tangents.push_back(tangent);
+               // }
+               // else {
+               //      mesh->tangents.push_back(Vec3(1, 0, 0));
+               // }
        }
        /* indices (called faces in assimp) */
        if(amesh->HasFaces()) {
-               mesh->which_mask |= MESH_INDEX;
                for(unsigned int i=0; i<amesh->mNumFaces; ++i) {
                        mesh->indices.push_back(amesh->mFaces[i].mIndices[0]);
                        mesh->indices.push_back(amesh->mFaces[i].mIndices[1]);