Multiple light fix in the FBX importer:

in fbxRLight.cpp

This:
/////
*    osg::Light* osgLight = new osg::Light;*
    osg::LightSource* osgLightSource = new osg::LightSource;

    osgLightSource->setLight(osgLight);
*    osgLight->setLightNum(nLightCount++);*
/////

Must be this:
/////
*    osg::Light* osgLight = new osg::Light;*
*    osgLight->setLightNum(nLightCount++);*

    osg::LightSource* osgLightSource = new osg::LightSource;
    osgLightSource->setLight(osgLight);
/////

Other way, you will always have GL_LIGHT0, but the last (from FBX tree) 8-)
osgLightSource->setLight() should be after light was tuned in other words...


KOS
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to