Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/model/objfile.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/model/objfile.cc b/src/model/objfile.cc
index aa6b6cf..56d3692 100644
--- a/src/model/objfile.cc
+++ b/src/model/objfile.cc
@@ -75,6 +75,7 @@ bool OBJFile::read()
math::Vector3f zero;
size_t current_m = 0;
+ size_t index_line = 0;
Fragment *fragment = 0;
Material *material = 0;
@@ -82,6 +83,8 @@ bool OBJFile::read()
while (objfile_ifs.getline(data, sizeof(data) - 1)) {
std::istringstream line(data);
+ index_line++;
+
std::string word;
line >> word;
@@ -115,7 +118,7 @@ bool OBJFile::read()
}
}
else
- con_warn << "Invalid material definition" << std::endl;
+ con_warn << objfile_name << " invalid material definition at line " << index_line << std::endl;
} else if( word.compare("v") == 0) { /* New wertex */
@@ -197,7 +200,7 @@ bool OBJFile::read()
}
if(points.size() != 4 && points.size() != 3) {
- con_warn << "Warning! " << objfile_name << ": Faces without 3 or 4 vertices will be ignored!" << std::endl;
+ con_warn << objfile_name << " face with " << points.size() << " vertices at line " << index_line << std::endl;
points.clear();
continue;
}
@@ -219,7 +222,7 @@ bool OBJFile::read()
if(points.size() == 3) {
if(!v0 || !v1 || !v2) {
- con_warn << "Warning! " << objfile_name << ": Invalid vertex!" << std::endl;
+ con_warn << objfile_name << " invalid vertex called from line " << index_line << std::endl;
continue;
}
@@ -243,7 +246,7 @@ bool OBJFile::read()
} else if(points.size() == 4) {
if(!v0 || !v1 || !v2 || !v3) {
- con_warn << "Warning! " << objfile_name << ": Invalid vertex!" << std::endl;
+ con_warn << objfile_name << " invalid vertex called from line " << index_line << std::endl;
continue;
}