]> git.mxchange.org Git - flightgear.git/blobdiff - src/Viewer/CameraGroup.cxx
Rely entirely on the configurable renderer and add more configuration options in...
[flightgear.git] / src / Viewer / CameraGroup.cxx
index f45a293a569f377f5955120cac15261314359aea..71b11d0656eac85bf87cdb8b45b08e5e52f74149 100644 (file)
@@ -32,7 +32,6 @@
 #include <simgear/structure/OSGVersion.hxx>
 #include <simgear/scene/material/EffectCullVisitor.hxx>
 #include <simgear/scene/util/RenderConstants.hxx>
-#include <simgear/scene/tgdb/userdata.hxx>
 
 #include <algorithm>
 #include <cstring>
 #include <osgViewer/GraphicsWindow>
 #include <osgViewer/Renderer>
 
+namespace flightgear {
+const char* MAIN_CAMERA = "main";
+const char* FAR_CAMERA = "far";
+const char* GEOMETRY_CAMERA = "geometry";
+const char* SHADOW_CAMERA = "shadow";
+const char* LIGHTING_CAMERA = "lighting";
+const char* DISPLAY_CAMERA = "display";
+}
+
 static osg::Matrix
 invert(const osg::Matrix& matrix)
 {
@@ -242,7 +250,7 @@ void CameraInfo::resized(double w, double h)
     }
 }
 
-osg::Camera* CameraInfo::getCamera(CameraKind k) const
+osg::Camera* CameraInfo::getCamera(const std::string& k) const
 {
     CameraMap::const_iterator ii = cameras.find( k );
     if (ii == cameras.end())
@@ -1027,8 +1035,6 @@ CameraInfo* CameraGroup::buildGUICamera(SGPropertyNode* cameraNode,
 CameraGroup* CameraGroup::buildCameraGroup(osgViewer::Viewer* viewer,
                                            SGPropertyNode* gnode)
 {
-    sgUserDataInit( globals->get_props() );
-
     CameraGroup* cgroup = new CameraGroup(viewer);
     for (int i = 0; i < gnode->nChildren(); ++i) {
         SGPropertyNode* pNode = gnode->getChild(i);