From: <sv...@ww...> - 2004-07-02 18:16:34
|
Author: delta Date: 2004-07-02 11:16:29 -0700 (Fri, 02 Jul 2004) New Revision: 1137 Modified: trunk/CSP/CSPSim/Source/ObjectModel.cpp Log: Added m_Lighting bool attribute. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1137 Modified: trunk/CSP/CSPSim/Source/ObjectModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ObjectModel.cpp 2004-07-02 18:15:50 UTC (rev 1136) +++ trunk/CSP/CSPSim/Source/ObjectModel.cpp 2004-07-02 18:16:29 UTC (rev 1137) @@ -179,6 +179,7 @@ m_ElevationCorrection = true; m_PolygonOffset = 0.0; m_CullFace = -1; + m_Lighting = true; } ObjectModel::~ObjectModel() { @@ -259,6 +260,11 @@ ss->setAttributeAndModes(po, osg::StateAttribute::ON); } + if (!m_Lighting) { + osg::StateSet *ss = m_Model->getOrCreateStateSet(); + ss->setMode(GL_LIGHTING,osg::StateAttribute::OFF); + } + if (m_CullFace != 0) { // XXX should reuse a single static CullFace instance. osg::StateSet *ss = m_Model->getOrCreateStateSet(); |