display error on failure to load .obj file

This commit is contained in:
Josh Holtrop 2011-04-25 16:29:55 -04:00
parent 698c7e99b7
commit bead7f9690

View File

@ -68,7 +68,11 @@ Viewer::Viewer(const char * filename)
{
m_dist = 5.0;
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 */
const float * aabb = m_obj.getAABB();