Skip to content
Snippets Groups Projects
Commit 07a94931 authored by Woohyung Choi's avatar Woohyung Choi
Browse files

fix parenthess bug

parent 3b8356f4
No related branches found
No related tags found
No related merge requests found
...@@ -106,6 +106,19 @@ bool openObj(const std::string fileName, std::vector<glm::vec3> &vertices, std:: ...@@ -106,6 +106,19 @@ bool openObj(const std::string fileName, std::vector<glm::vec3> &vertices, std::
sscanf_s(line.substr(0, charPos).c_str(), "%d%*[-//]%d", &vIndex, &vnIndex); sscanf_s(line.substr(0, charPos).c_str(), "%d%*[-//]%d", &vIndex, &vnIndex);
line.erase(0, charPos + 1); line.erase(0, charPos + 1);
} }
if (vIndex >= 1)
{
faceVertexIndicies.push_back(vIndex - 1);
}
if (uvIndex >= 1)
{
faceVertexTexCoordIndicies.push_back(uvIndex - 1);
}
if (vnIndex >= 1)
{
faceVertexNormalIndicies.push_back(vnIndex - 1);
}
} }
if (line.size() > 0) if (line.size() > 0)
...@@ -206,6 +219,7 @@ bool openObj(const std::string fileName, std::vector<glm::vec3> &vertices, std:: ...@@ -206,6 +219,7 @@ bool openObj(const std::string fileName, std::vector<glm::vec3> &vertices, std::
log_warn(infoLog, fileName + " : " + "faceVertexNormalIndices.size() : " + std::to_string(faceVertexNormalIndicies.size())); log_warn(infoLog, fileName + " : " + "faceVertexNormalIndices.size() : " + std::to_string(faceVertexNormalIndicies.size()));
} }
} }
}
ifs.close(); ifs.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment