From Per Fahlberg, "Attached is a fix to get the proper normals on an md2 model, actually
the way it was before would sometimes lead to a crash since it was attaching the wrong array to the geometry..."
This commit is contained in:
@@ -379,7 +379,7 @@ load_md2 (const char *filename, const osgDB::ReaderWriter::Options* options)
|
||||
geom->setTexCoordArray (0, texCoords);
|
||||
geom->setTexCoordIndices (0, texIndices);
|
||||
|
||||
geom->setNormalArray (g_md2NormalsArray);
|
||||
geom->setNormalArray (normalCoords);
|
||||
geom->setNormalIndices (normalIndices);
|
||||
geom->setNormalBinding (osg::Geometry::BIND_PER_VERTEX);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user