void CameraInfo::resized(double w, double h)
{
+ if (w == 1.0 && h == 1.0)
+ return;
+
bufferSize->set( osg::Vec2f( w, h ) );
for (RenderBufferMap::iterator ii = buffers.begin(); ii != buffers.end(); ++ii) {
camera = info->getCamera( GEOMETRY_CAMERA );
if (camera == 0) continue;
camera->setCullMask( nm & ~simgear::MODELLIGHT_BIT );
+
+ camera = info->getCamera( LIGHTING_CAMERA );
+ if (camera == 0) continue;
+ osg::Switch* sw = camera->getChild(0)->asSwitch();
+ for (unsigned int i = 0; i < sw->getNumChildren(); ++i) {
+ osg::Camera* lc = dynamic_cast<osg::Camera*>(sw->getChild(i));
+ if (lc == 0) continue;
+ string name = lc->getName();
+ if (name == "LightCamera") {
+ lc->setCullMask( (nm & simgear::LIGHTS_BITS) | (lc->getCullMask() & ~simgear::LIGHTS_BITS) );
+ }
+ }
}
}
}