X-Git-Url: https://eleni.mutantstargoat.com/git/?p=demo;a=blobdiff_plain;f=src%2Fscene.cc;h=c6408471f1163582c845b1523327214bdbd75a64;hp=08689f6831061b89b94ce320294d5b65dfee2024;hb=0da7a98f74d00bfa6cf0d47fd7cf0f687eeba5f6;hpb=826b0cf7adaf8b1dc4c37f57a4a98c79a3995e21 diff --git a/src/scene.cc b/src/scene.cc index 08689f6..c640847 100644 --- a/src/scene.cc +++ b/src/scene.cc @@ -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; imNumVertices; ++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; imNumFaces; ++i) { mesh->indices.push_back(amesh->mFaces[i].mIndices[0]); mesh->indices.push_back(amesh->mFaces[i].mIndices[1]);