From c8e7a9ea40debe8786712a975494aeb9e527ce41 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 28 Aug 2006 19:07:30 +0000 Subject: [PATCH] From Roger James, improved mapping of AC3D lighting model to OSG --- src/osgPlugins/ac3d/ac3d.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osgPlugins/ac3d/ac3d.cpp b/src/osgPlugins/ac3d/ac3d.cpp index 508608bb3..4e2d48051 100644 --- a/src/osgPlugins/ac3d/ac3d.cpp +++ b/src/osgPlugins/ac3d/ac3d.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -700,7 +701,12 @@ osg::Group *ac_load_object(std::istream &f,const ACObject *parent,const osgDB::R dstate->setTextureAttributeAndModes(0,ob.texture.get(),osg::StateAttribute::ON); } if (asurf.flags & SURFACE_TWOSIDED) + { + osg::LightModel *pLightModel = new osg::LightModel; + pLightModel->setTwoSided(true); + dstate->setAttributeAndModes(pLightModel); dstate->setMode( GL_CULL_FACE, osg::StateAttribute::OFF ); + } else dstate->setMode( GL_CULL_FACE, osg::StateAttribute::ON );