dodanie modelu lazik3.obj
This commit is contained in:
@@ -24,6 +24,8 @@ bool loadOBJ(const char* path, std::vector <glm::vec3>& out_vertices, std::vecto
|
||||
return false;
|
||||
}
|
||||
|
||||
int line = 0;
|
||||
|
||||
while (1) {
|
||||
|
||||
char lineHeader[128];
|
||||
@@ -57,7 +59,7 @@ bool loadOBJ(const char* path, std::vector <glm::vec3>& out_vertices, std::vecto
|
||||
int matches = fscanf(file, "%d/%d/%d %d/%d/%d %d/%d/%d\n", &vertexIndex[0], &uvIndex[0], &normalIndex[0], &vertexIndex[1], &uvIndex[1], &normalIndex[1], &vertexIndex[2], &uvIndex[2], &normalIndex[2]);
|
||||
|
||||
if (matches != 9){
|
||||
printf("File can't be read by our simple parser : ( Try exporting with other options\n");
|
||||
printf("File can't be read by our simple parser. Try exporting with other options (%d matches on line %d)\n", matches, line);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -87,6 +89,8 @@ bool loadOBJ(const char* path, std::vector <glm::vec3>& out_vertices, std::vecto
|
||||
out_normals .push_back(vertex3);
|
||||
}
|
||||
|
||||
line++;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user