virtual-world-framework/vwf — pull request #286 by allisoncorey (2014-07-24 14:57:58+00:00)
Title: Add check for a material map before correcting any missing UV coordinate...

This pull request fixes an issue with smoothShading that arose in a new model with generic (non-textured) default materials. In VWF, there was an inconsistency in shading between adjacent polygons, causing flat sides to look rather jagged, and an overall non-smooth look.

The function fixMissingUVs was the culprit which was added in commit 655dc93dc21c7cab5b711972abcd3acacf310002, adding initial support for multi-materials back in January 2013.

I added a check to only correct any missing UVs if there is a material map assigned, and did some spot checking to make sure both textured and untextured models are loading correctly.

@eric79 Can you please review?