display error on failure to load .obj file

This commit is contained in:
Josh Holtrop committed 2011-04-25 16:29:55 -04:00
1 parent 698c7e99b7
commit bead7f9690
1 file changed
+5 -1
+5 -1
View File
@@ -68,7 +68,11 @@ Viewer::Viewer(const char * filename)
{ {
m_dist = 5.0; m_dist = 5.0;
m_dragging = false; m_dragging = false;
m_obj.load(filename); if (!m_obj.load(filename))
{
cerr << "Error loading " << filename << endl;
exit(1);
}
/* Print out the object's size */ /* Print out the object's size */
const float * aabb = m_obj.getAABB(); const float * aabb = m_obj.getAABB();