I can make working part of "osgearth_lights.cpp" in my own code when using a geographic map.
But when trying to do the same on a projected map, some features don't seem to work.
1. void Light::setSpotExponent(float spot_exponent) doesn't work on a projected map!
// A red spot light. A spot light has a real position in space
// and points in a specific direciton. The Cutoff and Exponent
// properties control the cone angle and sharpness, respectively
GeoPoint p(geosrs, -121, 34, 5000000., ALTMODE_ABSOLUTE);
osg::Light* spot = new osg::Light(lightNum++);
spot->setAmbient(osg::Vec4(0, 0.2, 0, 1));
spot->setDiffuse(osg::Vec4(1, 1, 1, 1));
spot->setSpotExponent(100.0f); -> Doesn't work on a projected map!
// point straight down at the map:
osg::LightSource* spotLS = new osg::LightSource();
2. void Light::setDirection(const Vec3& direction) does't work if direction is expressed in a projected coordinate system!