From 0f65ed9189eeb7df56cc8abf4427cc98d6031533 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 30 Oct 2006 12:28:37 +0000 Subject: [PATCH] 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..." --- src/osgPlugins/md2/ReaderWriterMD2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/md2/ReaderWriterMD2.cpp b/src/osgPlugins/md2/ReaderWriterMD2.cpp index 167de6d93..b2c8fc348 100644 --- a/src/osgPlugins/md2/ReaderWriterMD2.cpp +++ b/src/osgPlugins/md2/ReaderWriterMD2.cpp @@ -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);